You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stefaan Somers <st...@gmail.com> on 2010/12/28 09:22:14 UTC

Error validating struts-2.0.dtd

I have create the most simple struts2 application, where I refer with my
build path to the necessary struts2-jar files.
But it keeps complaining in the Eclipse-IDE on "struts.xml" with the
following message : The errors below were detected when validating the file
"struts-2.0.dtd" via the file "struts.xml". In most cases these errors can
be detected by validating "struts-2.0.dtd" directly. However it is possible
that errors will only occur when struts-2.0.dtd is validated in the context
of struts.xml.

Content struts.xml :
<?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"> <struts> <constant
name="struts.enable.DynamicMethodInvocation" value="false" /> <constant
name="struts.devMode" value="false" /> <constant
name="struts.custom.i18n.resources" value="ApplicationResources" /> <package
name="default" extends="struts-default" namespace="/"> <action name="login"
class="net.viralpatel.struts2.LoginAction"> <result
name="success">Welcome.jsp</result> <result name="error">Login.jsp</result>
</action> </package> </struts>

Re: Error validating struts-2.0.dtd

Posted by Li Ying <li...@gmail.com>.
May be something getting wrong in Eclipse IDE.

Try:

(1)Delete the whole project from Eclipse IDE.
But NOT delete the project content from the file system

(2)Import the project to Eclipse again

(3)Clean the project

And see if the error get cleared?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Error validating struts-2.0.dtd

Posted by Stefaan Somers <st...@gmail.com>.
* There is no problem on the level of firewall/proxy, because I can do
software updates within eclipse without any problems
* if something is broken in dependencies, how can I check this?? The strange
thing is if I deploy it directly on my web-server, it works without any
problems

On 28 December 2010 11:44, Maurizio Cucchiara
<ma...@gmail.com>wrote:

> At first glance your struts.xml seems to be ok.
> I don't know the eclipse environment, the only two things that come to my
> mind are:
> 1 you are behind a firewall/proxy and eclipse is not be aware of this
> 2 there is something broken in your dependencies
>
>
> 2010/12/28 Stefaan Somers <st...@gmail.com>:
> > I have create the most simple struts2 application, where I refer with my
> > build path to the necessary struts2-jar files.
> > But it keeps complaining in the Eclipse-IDE on "struts.xml" with the
> > following message : The errors below were detected when validating the
> file
> > "struts-2.0.dtd" via the file "struts.xml". In most cases these errors
> can
> > be detected by validating "struts-2.0.dtd" directly. However it is
> possible
> > that errors will only occur when struts-2.0.dtd is validated in the
> context
> > of struts.xml.
> >
> > Content struts.xml :
> > <?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"> <struts> <constant
> > name="struts.enable.DynamicMethodInvocation" value="false" /> <constant
> > name="struts.devMode" value="false" /> <constant
> > name="struts.custom.i18n.resources" value="ApplicationResources" />
> <package
> > name="default" extends="struts-default" namespace="/"> <action
> name="login"
> > class="net.viralpatel.struts2.LoginAction"> <result
> > name="success">Welcome.jsp</result> <result
> name="error">Login.jsp</result>
> > </action> </package> </struts>
> >
>
> --
> Maurizio Cucchiara
>

Re: Error validating struts-2.0.dtd

Posted by Maurizio Cucchiara <ma...@gmail.com>.
At first glance your struts.xml seems to be ok.
I don't know the eclipse environment, the only two things that come to my
mind are:
1 you are behind a firewall/proxy and eclipse is not be aware of this
2 there is something broken in your dependencies


2010/12/28 Stefaan Somers <st...@gmail.com>:
> I have create the most simple struts2 application, where I refer with my
> build path to the necessary struts2-jar files.
> But it keeps complaining in the Eclipse-IDE on "struts.xml" with the
> following message : The errors below were detected when validating the
file
> "struts-2.0.dtd" via the file "struts.xml". In most cases these errors can
> be detected by validating "struts-2.0.dtd" directly. However it is
possible
> that errors will only occur when struts-2.0.dtd is validated in the
context
> of struts.xml.
>
> Content struts.xml :
> <?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"> <struts> <constant
> name="struts.enable.DynamicMethodInvocation" value="false" /> <constant
> name="struts.devMode" value="false" /> <constant
> name="struts.custom.i18n.resources" value="ApplicationResources" />
<package
> name="default" extends="struts-default" namespace="/"> <action
name="login"
> class="net.viralpatel.struts2.LoginAction"> <result
> name="success">Welcome.jsp</result> <result
name="error">Login.jsp</result>
> </action> </package> </struts>
>

-- 
Maurizio Cucchiara