You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vanessa Monteiro <Va...@quality.com.br> on 2004/01/13 16:58:05 UTC
mapping question
Hello everyone,
I'm having trouble understanding the mapping tags of
struts-config.xml.
I have one simple jsp form and one form and one action to take care of
it. In my /pages/form.jsp I have a <html:form pointing to my do/action.
My action-mapping is path=/action and I'm putting no input value. So to
get to my form I link to /pages/form.jsp or do I need and action to
point to the unsubmitted form?
Vanessa.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: mapping question
Posted by Mark Lowe <ma...@talk21.com>.
You can do either but i always use an action and forward to the jsp.
The only really objection not to routing your request through a mapping
is that you expose your jsp's to the user. But this often isn;t a
problem for some folks.
If you want to pre-populate your form then you can map the form to the
referring action so you can mess with it before the user is forwarded
to the form.
On 13 Jan 2004, at 15:58, Vanessa Monteiro wrote:
> Hello everyone,
>
> I'm having trouble understanding the mapping tags of
> struts-config.xml.
>
> I have one simple jsp form and one form and one action to take care of
> it. In my /pages/form.jsp I have a <html:form pointing to my do/action.
>
> My action-mapping is path=/action and I'm putting no input value. So to
> get to my form I link to /pages/form.jsp or do I need and action to
> point to the unsubmitted form?
>
> Vanessa.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: mapping question
Posted by "Daniel H. F. e Silva" <dh...@yahoo.com>.
Vanessa,
As discussed a time ago on this list, it is considered a best pratice
to go through an action all the time. So you can decouple your view layer
in a way that makes your life easier. There are plenty of learning resources
around the Internet about Struts, but i'd like to recommend www.reumann.net
and www.ibatis.com. iBATIS is where you'll find a nice implementation of PetStore
sample application that could be useful as a starting point to your apps.
Cheers,
Daniel Silva.
PS: If you need help during your day you could go to #struts_users IRC channel at irc.darkmyst.org
You'll meet nice people and very skilled java and struts developers there.
--- Vanessa Monteiro <Va...@quality.com.br> wrote:
> Hello everyone,
>
> I'm having trouble understanding the mapping tags of
> struts-config.xml.
>
> I have one simple jsp form and one form and one action to take care of
> it. In my /pages/form.jsp I have a <html:form pointing to my do/action.
>
> My action-mapping is path=/action and I'm putting no input value. So to
> get to my form I link to /pages/form.jsp or do I need and action to
> point to the unsubmitted form?
>
> Vanessa.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org