I am developing a very small web application with spring mvc, In my jsp view that is returned by controller,I want to get the name of the controller.
One way is we can pass the name in ModelandView,But I don wan to do that. As I am sending a list of some other oblect.
I am looking for other best solution if any.
With Advance thanks, Laxmi
Here are some ways that came through my mind:
Pass it in the request using request.setAttribute("name", "controller name");
.
Then in your jsp you can call ${ param.name }
.
Pass it in the session using session.setAttribute("name", "controller name");
.
Then in your jsp you can call ${ name }
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With