I found where I was wrong.
As Alexander M pointed out in comments no such url will be generated.
The thing is I've tried various bad solutions, but most of them had the next synopsis.
In struts.xml
I wrote:
<package name="product" namespace="/" extends="struts-default">
<action name="view" class="com.example.action.product.ViewProduct">
<result name="success">/WEB-INF/view/product/view.jsp</result>
</action>
</package>
and in jsp I refer to somee action as:
<a href="product/view">View product</a>
but seems like its wrong way to do it - in my case I had urls like:
http://localhost:8080/app/product/product/view.action
which is not valid.
So I changed struts.xml namespace to:
<package name="product" namespace="/product" extends="struts-default">
<action name="view" class="com.example.action.product.ViewProduct">
<result name="success">/WEB-INF/view/product/view.jsp</result>
</action>
</package>
And then in view.jsp
used struts <s:a>
tag (or you may use <s:url>
):
<a href="<s:url action='view' namespace="/product"/>"> View product</a>
<s:a action="view" namespace="/product"> View product</s:a>
For further reference about packages and namespaces understanding:
- Struts Namespace Configuration
- Struts Package Configuration