i have one question i’m using
@RequestMapping(value = "/user", method = RequestMethod.GET)
public String getUser(@RequestParam("id"), Model model){
}
this means that when i’ll give the url/user?id=1
that will give me back some data.
Now in the login i’m taking this id and i save it in a session.
session.setAttribute("userId", result.getBody().getId());
and i want when a user click at a tab automatically to be bind the id with the attribute stored in the session. i.e. lets say that the userId has as value 1. Then when i’ll click on the tab to redirected automatically to:url/user?id=1
How can i do this?
For the tab i have this one:
<a href="<c:url value='/user'/>"
you can use:
and for SpringMVC, I suggest you use the Restful url like
/usr/1,the action can be