java - How can I access path variables in a URI template in the view (Spring 3/SpringMVC)? -


I have a URI template as "/ hotel / {hotel} / booking / {booking}", and in the controller Reach the path variables through the path variable, but when creating a link in the view, I need the reference of different path variables.

As an example, let's assume that the user requests "/ hotel / 123 / booking / booking-123", and in this view, "/ hotel / 123" link back for booking How do I get a hook to {Hotel} from the URI template to create a "/ booking /" link? It seems disgusting to inject it into each scene, is there any easy way I am missing? / P>

This is a form of spring Has been raised in.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -