struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject RE: [S2]Validation with xml file not working
Date Fri, 15 Aug 2008 01:38:02 GMT
I think he was asking the original poster if *his* stack included those interceptors in the
correct order, since it's his validation that isn't working properly.

Dave

--- On Thu, 8/14/08, Martin Gainty <mgainty@hotmail.com> wrote:
> yes .. vanilla config from struts-default.xml
> 
>      <!-- Sample validation and workflow stack -->
>             <interceptor-stack
> name="validationWorkflowStack">
>                 <interceptor-ref
> name="basicStack"/>
>                 <interceptor-ref
> name="validation"/>
>                 <interceptor-ref
> name="workflow"/>
>             </interceptor-stack>
> 
> HTH
> Martin 
> ______________________________________________ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to
> the official business of Sender. This transmission is of a
> confidential nature and Sender does not endorse distribution
> to any party other than intended recipient. Sender does not
> necessarily endorse content contained within this
> transmission. 
> 
> 
> > Date: Fri, 15 Aug 2008 00:22:01 +0200
> > From: simon.void@gmx.de
> > Subject: Re: [S2]Validation with xml file not working
> > To: user@struts.apache.org
> > 
> > > What could it be?
> > 
> > i don't know which interceptors are on your
> default stack. Does 'workflow' come after
> 'validation'?
> > 
> > /Stephan
> > 
> > -------- Original-Nachricht --------
> > > Datum: Thu, 14 Aug 2008 18:20:33 +0200
> > > Von: "Ylva Degerfeldt"
> <ylva.degerfeldt@gmail.com>
> > > An: "Struts Users Mailing List"
> <user@struts.apache.org>
> > > Betreff: Re: [S2]Validation with xml file not
> working
> > 
> > > Lukasz, I'm not sure how to check the
> deployment but I was thinking
> > > that too. (I'm using NetBeans 5.5.1 and Sun
> App. server.)
> > > 
> > > André, it's funny you should mention that
> because I just changed the
> > > name From .....-validation.xml to
> ....-validations.xml because they
> > > must have misspelled it in one place in the
> "Struts 2 in Action" book,
> > > so I thought that was the correct way since the
> name without the s
> > > gives me this exception:
> > > 
> > > java.lang.IllegalArgumentException: URI is not
> hierarchical
> > > 
> > > At least I know it has nothing to do with that
> I'm uploading a file
> > > from a form, 'cause that part works fine.
> It's something about the
> > > validation. What could it be?
> > > 
> > > /y
> > > 
> > > On Thu, Aug 14, 2008 at 6:04 PM, André Cedik |
> GDG
> > > <a.cedik@german-digital-group.de> wrote:
> > > > Maybe it's just because of the
> misspelling.
> > > > If you'd like to do validation this way,
> > > > your xml-file should be named
> > > > "NameAndCvAction-validation.xml"
> without
> > > > the "s" at the end.
> > > >
> > > >
> > > > Ylva Degerfeldt wrote:
> > > >> Hi everyone,
> > > >>
> > > >> I'm trying to use the Validation
> framework by creating a file called
> > > >> NameAndCvAction-validations.xml, for my
> action "NameAndCvAction", but
> > > >> it's not working the way it should.
> > > >> I've stepped through the code and it
> seems that the validations that
> > > >> should have been made through the xml
> file just don't happen.
> > > >>
> > > >> When, for instance, I've tried to
> deliberately leave some fields empty
> > > >> (which the validator should have
> noticed), the execute method is still
> > > >> invoked. This shouldn't happen when
> there are validation errors,
> > > >> right?
> > > >>
> > > >> I've put the validation xml file in
> the same directory (and package)
> > > >> as the corresponding action, but it
> seems that Struts 2 can't find it
> > > >> anyway. What am I doing wrong?
> > > >>
> > > >> This is the declaration of my action in
> struts.xml:
> > > >> .....
> > > >> <action name =
> "NameAndCvAction" class =
> > > "Web.StrutsActions.NameAndCvAction">
> > > >>            
> <result>/showSkills.jsp</result>
> > > >>             <result name =
> "input">/NameAndCv.jsp</result>
> > > >> </action>
> > > >> ....
> > > >> (This belongs to a package that extends
> struts-default)
> > > >>
> > > >> By the way, I'm also using simple
> validation which works without
> > > >> problems. (But I'd like to know how
> to use the validation framework
> > > >> "the harder way" too.)
> > > >>
> > > >> Can somebody please help me?
> > > >>
> > > >> Thanks in advance!
> > > >>
> > > >> /Ylva
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> 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
> > > >
> > > >
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> user-help@struts.apache.org
> > 
> > -- 
> > GMX Kostenlose Spiele: Einfach online spielen und
> Spaß haben mit Pastry Passion!
> >
> http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> > 
> 
> _________________________________________________________________
> Your PC, mobile phone, and online services work together
> like never before.
> http://clk.atdmt.com/MRT/go/108587394/direct/01/

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


Mime
View raw message