I have this project was working fine in Jetty, recently as requested, I'm testing it on Tomcat, but I found a problem.
We're using Struts 2, and the action mapping is defined with no extension, such as
http://www.somehost.com/projectname/home
when I get everything deployed into Tomcat and access the URL above and I got this error:
"There is no Action mapped for namespace [/] and action name [home/]"
clearly somehow Tomcat added an extra /
to the URL, so the Struts thinks the action name is home/
instead of home
.
And if I changed the action config from home
to home/
, it works fine. But I don't want to change every action mapping with an extra /
, there should be better solution.
Here is my configuration for the action:
<action name="home" class="com.hp.bpm.portal.action.EmptyAction">
<result name="success" type="tiles">
<param name="location">home.default</param>
<param name="menuItem">home</param>
</result>
</action>
it's configured under /
package, when nothing changes, I got 404, and if I change above as:
<action name="home/" class="com.hp.bpm.portal.action.EmptyAction">
<result name="success" type="tiles">
<param name="location">home.default</param>
<param name="menuItem">home</param>
</result>
</action>
then it works.