Unfortunately it doesn't help.
The situation where I have a problem is, to extend the example, where I have
a URL of the form (note the added "/admin");
http://www.mycompany.com/myapplication/execute/admin/logon
If I were using prefix mapping the ActionServlet would receive the path
"/admin/logon" and use it to lookup the corresponding ActionMapping. In
struts-config.xml this ActionMapping would have been defined something like
this;
<action-mappings>
<action path="/admin/logon"
type="foo.bar.LogonAction"
name="logonActionForm"
scope="request"
input="/admin/logon.jsp">
</action>
</action-mappings>
The path attribute being the key that is used to lookup an ActionMapping in
the ActionMappings class.
To execute the same URL using the FormTag in a JSP page would be done
something like;
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
...
<html:form action="execute/admin/logon">
...
which would produce the following html element;
<FORM ACTION="execute/admin/logon">
Except that before it does the FormTag strips the path part and attempts to
lookup an ActiionMapping using the key "/logon". This doesn't exist so a
ServletException is thrown.
Exactly the same happens if you use prefix mapping (just remove "execute/"
and add ".do" to all the examples).
What I think should happen in the FormTag is that it should only strip the
path up to and including the prefix part (if using prefix mapping) or the
servlet context path (if using prefix mapping). This way it will behave in
the same way as ActionServlet does.
Apologies for being so longwinded.
Howard.
> -----Original Message-----
> From: Mike Fitterman [mailto:[EMAIL PROTECTED]]
> Sent: 24 January 2001 16:10
> To: [EMAIL PROTECTED]
> Subject: re: FormTag problem
>
>
> Don't know if this helps but it sure seems like it (this is
> from the doc):
>
> There are two common approaches to defining the URLs that
> will be processed
> by the controller servlet -- prefix matching and extension
> matching. An
> appropriate mapping entry for each approach will be described below.
> Prefix matching means that you want all URLs that start
> (after the context
> path part) with a particular value to be passed to this
> servlet. Such an
> entry might look like this:
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>/execute/*</url-pattern>
> </servlet-mapping>
> which means that a request URI to match the /logon path
> described earlier
> might look like this:
>
http://www.mycompany.com/myapplication/execute/logon
where /myapplication is the context path under which your application is
deployed.
Extension mapping, on the other hand, matches request URIs to the action
servlet based on the fact that the URI ends with a period followed by a
defined set of characters. For example, the JSP processing servlet is
mapped to the *.jsp pattern so that it is called to process every JSP page
that is requested. To use the *.do extension (which implies "do
something"), the mapping entry would look like this:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
and a request URI to match the /logon path described earlier might look
like this:
http://www.mycompany.com/myapplication/logon.do
<-- snip -->