You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by alex xander <xa...@yahoo.com> on 2007/07/03 05:10:16 UTC

weird thing with xwork 2.0.3

i use struts 2.0.8 and tomcat 6.0.10 as server
i want to upgrade from xwork 2.0.1 to 2.0.3.
everything work fine with xwork 2.0.1
but with xwork 2.0.3 i find some weird thing
i got error just when i run com.bba.security.Login.java, but when i put it on another package for example com.bba.test.Login.java
everything work fine again 
here is my struts.xml

<action name="login" class="com.bba.security.Login">
                <result name="success" type="redirect">/backend/home.action</result>
                <result name="input" type="redirect">/index.jsp</result>
                <result name="error">/index.jsp</result>
        </action>

and here is the stack trace


Document is invalid: no grammar found. - file:///E:/data%20kerja/tomcat-channeling/bin/validators.xml:1:12
 com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
 com.opensymphony.xwork2.validator.ValidatorFileParser.parseValidatorDefinitions(ValidatorFileParser.java:125)
 com.opensymphony.xwork2.validator.ValidatorFileParser.parseValidatorDefinitions(ValidatorFileParser.java:99)
 com.opensymphony.xwork2.validator.ValidatorFactory.retrieveValidatorConfiguration(ValidatorFactory.java:344)
i don't know why is xwork search for validator.xml in folder tomcat-root/bin not in tomcat-root/webapps/myweb/WEB-INF/classes

i don't make any extra configuration
can some one help me?


       
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.

Re: weird thing with xwork 2.0.3

Posted by alex xander <xa...@yahoo.com>.
thx alot,
u solve my problem. that's work

Zoran Avtarovski <zo...@sparecreative.com> wrote: I got caught out on this as well.

You have to add the DTD statement to your validators.xml file like this:


         "-//OpenSymphony Group//XWork Validator
Config 1.0//EN"
   
"http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">


2.0.1 didn't need it, but 2.0.8 does.

Z.


> i use struts 2.0.8 and tomcat 6.0.10 as server
> i want to upgrade from xwork 2.0.1 to 2.0.3.
> everything work fine with xwork 2.0.1
> but with xwork 2.0.3 i find some weird thing
> i got error just when i run com.bba.security.Login.java, but when i put it on
> another package for example com.bba.test.Login.java
> everything work fine again
> here is my struts.xml
> 
> 
>                 
> type="redirect">/backend/home.action
>                 /index.jsp
>                 /index.jsp
>         
> 
> and here is the stack trace
> 
> 
> Document is invalid: no grammar found. -
> file:///E:/data%20kerja/tomcat-channeling/bin/validators.xml:1:12
>  com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
>  
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseValidatorDefinition
> s(ValidatorFileParser.java:125)
>  
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseValidatorDefinition
> s(ValidatorFileParser.java:99)
>  
> com.opensymphony.xwork2.validator.ValidatorFactory.retrieveValidatorConfigurat
> ion(ValidatorFactory.java:344)
> i don't know why is xwork search for validator.xml in folder tomcat-root/bin
> not in tomcat-root/webapps/myweb/WEB-INF/classes
> 
> i don't make any extra configuration
> can some one help me?
> 
> 
>        
> ---------------------------------
> Be a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org



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



       
---------------------------------
Pinpoint customers who are looking for what you sell. 

Re: weird thing with xwork 2.0.3

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
I got caught out on this as well.

You have to add the DTD statement to your validators.xml file like this:

<!DOCTYPE validators PUBLIC
         "-//OpenSymphony Group//XWork Validator
Config 1.0//EN"
   
"http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">


2.0.1 didn't need it, but 2.0.8 does.

Z.


> i use struts 2.0.8 and tomcat 6.0.10 as server
> i want to upgrade from xwork 2.0.1 to 2.0.3.
> everything work fine with xwork 2.0.1
> but with xwork 2.0.3 i find some weird thing
> i got error just when i run com.bba.security.Login.java, but when i put it on
> another package for example com.bba.test.Login.java
> everything work fine again
> here is my struts.xml
> 
> <action name="login" class="com.bba.security.Login">
>                 <result name="success"
> type="redirect">/backend/home.action</result>
>                 <result name="input" type="redirect">/index.jsp</result>
>                 <result name="error">/index.jsp</result>
>         </action>
> 
> and here is the stack trace
> 
> 
> Document is invalid: no grammar found. -
> file:///E:/data%20kerja/tomcat-channeling/bin/validators.xml:1:12
>  com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
>  
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseValidatorDefinition
> s(ValidatorFileParser.java:125)
>  
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseValidatorDefinition
> s(ValidatorFileParser.java:99)
>  
> com.opensymphony.xwork2.validator.ValidatorFactory.retrieveValidatorConfigurat
> ion(ValidatorFactory.java:344)
> i don't know why is xwork search for validator.xml in folder tomcat-root/bin
> not in tomcat-root/webapps/myweb/WEB-INF/classes
> 
> i don't make any extra configuration
> can some one help me?
> 
> 
>        
> ---------------------------------
> Be a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org



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