I'm getting confusion to converting the codebehind annotation to conventional struts.xml
file.
How to identify action name in action class? Because if write method public String list{}
- action its match with JSPs product-list.jsp
will automatically identify the page and URL was product!list
like that. What is going to be conventional plugin ?
current URL :
http://localhost:7001/example/product!search
- jsp name product-search.jsp
and ProductAction
- action class.
Please tell me how to configure the struts.xml
file which equivalent above config.
I have tried like below:
<package name="example" namespace="/" extends="struts-default">
<action name="Search">
<result>product-search.jsp</result>
</action>
</package>
Error :
org.apache.struts2.dispatcher.Dispatcher - Could not find action or result
There is no Action mapped for namespace / and action name part. - [unknown location]