We are developing an Struts 2 base web application.
Please let me know which is correct (standard) in Strust 2 application
<s:url var="url" action="foo" namespace="bar" />
<s:url var="url" action="/foo" namespace="/bar" />
<s:url var="url" action="foo" namespace="/bar" />
Long story:
To get an action url we always used below
<s:url var="url" action="foo" namespace="bar" />
We tried to add the rest support to our application and make our application support rest and non rest actions same as mentioned in REST and non-RESTful URL's Together Configuration
and also Struts2 REST and Non-REST action together.
It seems that the <s:url var="url" action="foo" namespace="bar" />
is always mapped to default action, while the <s:url var="url" action="/foo" namespace="/bar" />
works fine.
Is it a bug in org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper
class or the action and namespace should always have slashes?