struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Bashmakov" <bashma...@gmail.com>
Subject Re: Simple validation does not work
Date Sat, 09 Aug 2008 10:26:55 GMT
I'm using JBOSS-5.0.0.CR1, could you please explain in more details what I
should do?

On Fri, Aug 8, 2008 at 7:37 PM, holod <serega.sheypak@gmail.com> wrote:

>
> If you are using IBM WebSphere 6.x, that's ok.
> I've faced the same problem: http://jira.opensymphony.com/browse/XW-651
>
> So, I've simply checked out branch of x-work, packaged it using Maven and
> now stupid IBM App server allows me to use validation.
>
> Anyway, you you aren't WebSphere user, I suggest you to perform the same
> operation.
>
> P.S.
>
> I prefer to use annotations. They are more comfortable.
>
>
>
> JAnton wrote:
> >
> > Hi,
> > I have strange situation, here is my form :
> >
> >     <body>
> >         <s:form action="Colors" >
> >             <s:textfield label="Name" name="name" />
> >             <s:submit />
> >         </s:form>
> >
> >     </body>
> >
> > Here is the action :
> >
> > public class Colors extends ActionSupport {
> >
> >     private String name;
> >
> >     @Override
> >     public String execute() throws Exception {
> >         return SUCCESS;
> >     }
> >
> >     public String getName() {
> >         return name;
> >     }
> >
> >     public void setName(String name) {
> >         this.name = name;
> >     }
> > }
> >
> > Here is the part of struts.xml :
> >
> >         <action name="Colors_*" method="{1}"
> > class="com.anton.noname.actions.Colors" >
> >             <result type="redirectAction">/Welcome</result>
> >             <result name="input">/Colors.jsp</result>
> >         </action>
> >
> > and finally Colors-validation.xml :
> >
> > <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator
> > 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> ">
> >
> > <validators>
> >     <field name="name">
> >         <field-validator type="requiredstring">
> >             <message>You must enter a name</message>
> >         </field-validator>
> >     </field>
> > </validators>
> >
> > And there is stake trace that I get :
> >
> > *type* Exception report
> >
> > *message*
> >
> > *description* *The server encountered an internal error () that prevented
> > it
> > from fulfilling this request.*
> >
> > *exception*
> >
> > javax.servlet.ServletException: Filter execution threw an exception
> >
> >
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> >
> > *root cause*
> >
> > java.lang.ExceptionInInitializerError
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.java:192)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFileParser.java:72)
> >
> >
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:361)
> >
> >
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs(AnnotationActionValidatorManager.java:252)
> >
> >
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs(AnnotationActionValidatorManager.java:340)
> >
> >
> >
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
> >
> >
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
> >
> >
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> >
> > *root cause*
> >
> > java.lang.IllegalArgumentException: URI scheme is not "file"
> >       java.io.File.<init>(File.java:366)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators(ValidatorFactory.java:314)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFactory.<clinit>(ValidatorFactory.java:224)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs(ValidatorFileParser.java:192)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs(ValidatorFileParser.java:72)
> >
> >
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile(AnnotationActionValidatorManager.java:361)
> >
> >
> > Can somebody tell me why the simplest validation show this behavior?
> > --
> > Best regards,
> > Bashmaкov Anton
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Simple-validation-does-not-work-tp18894126p18896117.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Best regards,
Bashmaкov Anton
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message