Why does the '<form:form ...>' tag strip any text before the final
forward-slash from the 'action' attribute before looking up the
ActionMapping? It seems to me that this makes it impossible to use actions
whose path contains a forward-slash. 

For example, I would like to have a URL of the form
'http://<hostname>/myApp/admin/login.do' display a login form. In my
struts-config.xml I have an action defined as follows;

<action    path="/admin/login"
           type="foo.bar.LoginAction"
           name="loginActionForm"
           scope="request"
           input="/WEB-INF/jsp/admin/login.jsp">
</action>

and in login.jsp I have the line;

<form:form action="admin/login.do" scope="request">

When ActionServlet is invoked it looks up an ActionMapping under the key
'/admin/login', finds it and creates the loginActionForm bean. When control
is passed to the jsp page, however, the form tag strips the '/admin' part
from the action and looks up the ActionMapping under the key '/login'. This
doesn't exist so the tag throws a JspTagException. 

This could be solved by changing FormTag to behave in the same way as
ActionServlet and not strip anything before the final forward-slash but I
presume there is a reason for this. Does anybody have any other suggestions
as to how I can get this to work?

-------------------------------------------
Howard Moore
Senior Software Engineer
Datapulse CTI
Tel : +44 (0)1491 418000
Fax : +44 (0)1491 411459
E-mail: [EMAIL PROTECTED]

Reply via email to