I know how to use wildcard method invocation within struts.xml, but is it possible to do this with annotations? If so how?
I know how to use wildcard method invocation within struts.xml, but is it possible
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You probably have it resolved by now, but for those looking for an answer, yes it is possible.
For wildcard mapping, refer to: http://struts.apache.org/2.3.1.2/docs/wildcard-mappings.html
To read params from the url, annotate your method with this:
In the case I want to redirect to a specific url, use this annotation:
You would need a getter/setter for the entityId (String in my case).
You can also have advanced wilcard mapping, namespace wildcard mapping …
Don’t forget to change the struts.xml and add the following constants.