I have my action servlet mapped to 2 different url patterns (which are used for
filtering purposes elsewhere in my site). It seems the order of my servlet mappings
affects the action attribute of my form by appending of the suffix of the last mapping
to the end of the form's action.
As an example:
I have the following servlet definition:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
And the following mappings:
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.tm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.usr</url-pattern>
</servlet-mapping>
And the following form definition in my JSP:
<html:form action="order/item/add.tm">
When I load the jsp page with the above form definition and view the source, the form
definition ends up looking like this:
<form name="addItemForm" method="post"
action="/website/gsp/order/item/add.usr">
If i swap the order of the mappings above so that the url-pattern *.tm is second, then
the form definition ends up being:
<form name="addItemForm" method="post" action="/website/gsp/order/item/add.tm">
Can anyone explain why this might be happening?
Thanks
Toby
***************************************************************
This message is intended for the addressee named and
may contain confidential information. If you are not the
intended recipient, please delete it and notify the sender.
Views expressed in this message are those of the
individual sender, and are not necessarily the views of
the Department of Lands.
This email message has been swept by MIMEsweeper
for the presence of computer viruses.
***************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]