UserMaint.jsp (contains links only) calls AddUserProfile.jsp which links with AddUserProfileAction.java (it contains DispatchAction) and AddUserProfileForm.java
UserMaint.jsp constructs originally like this: <html:link page="/AddUserProfile.jsp?method=setup"> <bean:message key="userMaint.addUserProfile"/> </html:link> Do you suggest me to change the coding to the following? <html:link page="/AddUserProfile.do?method=setup"> <bean:message key="userMaint.addUserProfile"/> </html:link> On Wed, 25 Aug 2004 22:09:55 -0400, Bill Siggelkow <[EMAIL PROTECTED]> wrote: > PC -- I am not sure what you mean by "AddUserProfileAction.java > (AddUserProfile.jsp)"? Do you mean that the Action forwards to the JSP? > Or do you mean that the JSP submits to the Action? > > Anyway, if you want the link to be to the Action it would be like this: > > <html:link page="/AddUserProfile.do?method=setup"> > <bean:message key="userMaint.addUserProfile"/> > </html:link> > > Notice the ".do" on the page attribute. > > > > PC Leung wrote: > > My first web page is page contains links only. No Form nor Action. > > > > UserMaint.jsp ---> AddUserProfileAction.java (AddUserProfile.jsp) > > > > UserMaint.jsp constructs: > > <html:link page="/AddUserProfile.jsp?method=setup"> > > <bean:message key="userMaint.addUserProfile"/> > > </html:link> > > > > The link becomes http://.../AddUserProfile.jsp.do?method=setup > > > > Does it mean that it cannot invoke the setup DispatchAction? > > > > public final class AddUserProfileAction extends DispatchAction { > > > > public ActionForward setup (ActionMapping mapping, > > ActionForm form, > > HttpServletRequest request, > > HttpServletResponse response) > > throws Exception { > > HttpSession session = request.getSession(); > > saveToken(request); > > return (mapping.getInputForward()); > > } > > > > On Wed, 25 Aug 2004 14:49:32 -0400, Bill Siggelkow > > <[EMAIL PROTECTED]> wrote: > > > >>I am not quite sure I am following this (it would help to see the > >>relevant action mappings from your struts-config.xml but it sounds like > >>you may not be saving the token *in the action preceding the JSP that > >>contains the form*. > >> > >> > >> > >>PC Leung wrote: > >> > >> > >>>Error message is solved. > >>>but the form does not display with token when it displays > >>>at the first time. > >>>I think the following line does not work properly. > >>> > >>>UserMaint.jsp constructs: > >>> <html:link page="/AddUserProfile.jsp?method=setup"> > >>> > >>>In the setup DispatchAction, I try to saveToken(). > >>> > >>>On Wed, 25 Aug 2004 10:19:04 -0500, Joe Germuska <[EMAIL PROTECTED]> wrote: > >>> > >>> > >>>>At 10:54 PM +0800 8/25/04, PC Leung wrote: > >>>> > >>>> > >>>>>my setup DispatchAction does not show a token when the form first displays. > >>>>>When I click submit button to create record, it shows error messages > >>>>>of handler. What does needs to be done? > >>>> > >>>>What are the error messages? > >>>> > >>>> > >>>> > >>>>>AddUserProfile.jsp constructs: > >>>>> > >>>>> <html:form action="/addUserProfile?method=create" focus="firstName"> > >>>>> <html:hidden property="action"/> > >>>>> <html:submit><bean:message > >>>>>key="addUserProfileForm.submit"/></html:submit> > >>>> > >>>>here you should probably pass "method=create" as a hidden form field; > >>>>I don't think the html form tag will handle an action specified like > >>>>that correctly. > >>>> > >>>>Joe > >>>> > >>>>-- > >>>>Joe Germuska > >>>>[EMAIL PROTECTED] > >>>>http://blog.germuska.com > >>>>"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn > >>>>back; I'll know I'm in the wrong place." > >>>> - Carlos Santana > >> > >> > >>--------------------------------------------------------------------- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]