struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Kovacs" <>
Subject RE: html:form frustration
Date Fri, 20 Sep 2002 17:50:54 GMT
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, /
and / 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 --> / --> /jsp/edit.jsp

What it SHOULD have been:

/jsp/index.jsp --> / --> / --> /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! =)


-----Original Message-----
From: Danny Mui [] 
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">

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 "/" (that doesn't exist) where the action servlet 
disregards .do part and properly dispatches.



To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message