developer
developer

Reputation: 9478

The file cannot be validated as the host "struts.apache.org" is currently unreachable

In struts-config.xml under declaration of Doc type

<!DOCTYPE struts-config PUBLIC
      "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
      "http://struts.apache.org/dtds/struts-config_1_3.dtd">

at url "http://struts.apache.org/dtds/struts-config_1_3.dtd" in the xml getting below message as "The file cannot be validated as the host "struts.apache.org" is currently unreachable."

Due to this iam unable to deploy the application.

anyidea how to resolve the above issue.

Upvotes: 0

Views: 7685

Answers (2)

kapil dev yadav
kapil dev yadav

Reputation: 1

Replace your lib jar to struts2-core-2.3.20.jar so you can use org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter in web.xml and accordingly other dependent jars like xwork, ognl, free marker etc.

Despite of warning of structs.xml, application will run now.

Upvotes: 0

Jasonw
Jasonw

Reputation: 5064

The link in your question works fine for me, but the link below is what I'm using currently, try it and see?

http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd

Edit: reference dtd locally. I think this should do the trick.

  1. copy struts-config_1_3.dtd and then place into /WEB-INF/dtd folder
  2. modify the doctype in struts-config.xml to this

    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "../dtd/struts-config_1_3.dtd">

Upvotes: 1

Related Questions