This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes How can we get URL in Spring framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How can we get URL in Spring framework" Watch "How can we get URL in Spring framework" New topic
Author

How can we get URL in Spring framework

Nagaraju Mulinti
Ranch Hand

Joined: Aug 10, 2008
Posts: 37
Hi,

I want to know the browser URL and based on the browser URL I need to execute some logic.Is there any way to get URL in Spring framework.

Thanks in advance.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

I don't know what Controller you're using, but every one has one or more methods that take a HttpServletRequest as a parameter - you can get the URL from the HttpServletRequest method getRequestURL().


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Nagaraju Mulinti
Ranch Hand

Joined: Aug 10, 2008
Posts: 37
Thanks Nathan for your info.
 
 
subject: How can we get URL in Spring framework
 
It's not a secret anymore!