Hi Danny,

Checking the code for FormTag.getActionMappingName() it takes everything
from the last / in the name, strips off any paramters (?....), then anything
after the last . (eg. .do)  So, to the form tag at least, /edit, /edit.do
and /edit.do?action=goInsane are all equivalent.

On the bright side, I did find my problem. It was a pretty newbie
error...which makes sense since I'm pretty newbie to struts. My mistake was
in trying to bypass the Controller...(Bad programmer! Never sidestep the
architecture...unless you REALLY mean it! ;)

The path I gave earlier:

/jsp/index.jsp --> /load.do --> /jsp/edit.jsp

What it SHOULD have been:

/jsp/index.jsp --> /load.do --> /edit.do --> /jsp/edit.jsp

This allows the controller to instantiate an editForm bean and store it in
the request scope. 

Thanks for all your help though! =)

Jonathan

-----Original Message-----
From: Danny Mui [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 19, 2002 5:46 PM
To: Struts Users Mailing List
Subject: Re: html:form frustration


Hi Jonathan,

Sorry I jumped to conclusions :).

I believe the action looker-upper ignores .do part in your action in the 
form tag but the correct syntax would be :

<html:form action="/edit">
</html:form>

Since your action config specifies "/edit" your form tag should also 
specify "/edit".

I think that is what is confusing the lookup.  It's looking for a 
mapping of "/edit.do" (that doesn't exist) where the action servlet 
disregards .do part and properly dispatches.

hth

danny


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Reply via email to