Reputation: 407
How can I have an URL in Struts 2, which contains the id
of an object, and then passes it to an action to show the object by this id
?
E.g. the URL is /users/1
and it shows a user
object which has the id =1
.
Upvotes: 0
Views: 168
Reputation: 1
To have parameters as a part of the path of the URL you should use an action mapper which is able to parse them when a request is processed by Struts.
In Struts you can find different action mapper implemented classes.
Upvotes: 1