Is what I am doing calling JSP pages directly? From my struts-config below I show them being mapped to Actions.
My question was that I have to set the html:form action to be the calling Action in order to populate it, but I want it to submit to a different page, and if I follow the Apache struts example as below, it doesn't follow correctly.
I think I'm missing something. Your struts-config looks fine:
My struts-config:
<action path="/userEdit"
type="com.racquetclub.action.UserEditAction" name="user">
<forward name="display" path="/Users/UserEdit.jsp"/>
</action>
<action path="/userUpdate"
type="com.racquetclub.action.UserUpdateAction"
name="user">
<forward name="success" path="/Users/displayUsers.jsp"/>
</action>
So the user goes here:
yourserver/yourCtx/userEdit.do
your UserEditAction executes, and is given an instance of ActionForm based on the form-bean config with the ID "user". It prepopulates and delivers to the UserEdit.jsp page.
This page includes a form which looks like this: <html:form action="/userUpdate">...</html:form>
When the <html:form> tag executes, it uses "/userUpdate" to look up an action mapping, where it finds that it needs an ActionForm linked to the id "user" for prepopulating its fields. It should find the same one which was prepopulated, and the fields should be filled according to what UserEditAction set up.
When the form submits, it is processed by a different action at a different path linked to the same form-bean ("user"). You might want to add "validate='true'" to the "/userUpdate" mapping, unless you're not performing any validation with Struts.
What isn't working? It sounds like you think your form has to submit to "/userEdit", but it doesn't, if you have another action mapping which uses the same ("user") form bean.
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]