Question

I am using Struts2 When i am writting a program, in struts.xml file getting warning "the file cannot be validated as there was a connection problem " at the line:-" !DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd" "

<?xml version="1.0" encoding="UTF-8" ?> 
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "struts.apache.org/dtds/struts-2.0.dtd">; 
<struts> 
  <constant name="struts.enable.DynamicMethodInvocation" value="false" /> 
  <constant name="struts.devMode" value="true" /> 
  <package name="default" namespace="/" extends="struts-default"> 
  <action name="testAction" class="javaguys.tutorials.actions.TestAction"> 
     <result name="success">/Home.jsp</result> 
  </action> 
  </package> 
</struts>
Était-ce utile?

La solution

Remove the ';' from the end of your DOCTYPE this should be at the root of your struts config.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top