You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeromy Evans <je...@blueskyminds.com.au> on 2008/01/22 11:35:52 UTC
Blank action extension in root namespace causing 302 in Tomcat
Hi,
When S2 is configured with BLANK action extensions and an action is
defined in the root namespace, Tomcat is returning a 302 redirect
instead of executing the action.
When the same S2 action is defined in a non-root namespace with the same
settings as above, Tomcat executes the action correctly
eg. Case 1 (root namespace):
GET http://host:8080/email returns a 302 to http://host:8080/email/
The subsequent GET http://host:8080/email/ returns a 404 Not Found
(correctly)
eg. Case 2 (non-root namespace):
GET http://host:8080/example/email works
Does anyone know where the 302 may be originate? A Tomcat setting or
the ActionMapper/FilterDispacher itself?
More details:
web.xml has the struts2 filter mapping: /*
struts.properties:
struts.action.extension=action,,
struts.xml (case 1):
<package name="email" extends="struts-default">
<action name="email" class="pkg.EmailAction">
...
struts.xml (case 2):
<package name="email" extends="struts-default" namespace="/example">
<action name="email" class="pkg.EmailAction">
All other settings are defaults. Applies to S2.0 and S2.1
For verification of Case 1, GET http://host:8080/email.action does work
- it's only the blank extension that causes a redirect.
Related emails:
http://www.nabble.com/Pretty-urls-without-.action-td14947106.html
Thanks,
Jeromy Evans
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org