• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get previous URL to current URL in spring MVC portlet

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI All,

i need to get value matched from previous URL to Current URL accessed

String url=""+PortalUtil..getCurrentURL(request) takes only current URL .

What can i do for previous URL to current URL accessed

How to do it.

Please Help me out Here!

Thanks in Advance
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not this is Spring related. But what if you wrote JavaScript that when you submit that page, it gets that current URL that the browser is showing and populate a hidden form field with that value, then you can get it in your code, like any other parameter.

This will only work on your own pages, but if the user comes from anywhere outside your site, from say www.google.com you won't be able to get a "previous" url, because you could be coming from anywhere, and to me even if you could that would be a security risk. I don't want you to know that I was coming from www.somepornsite.com

Hope that makes sense.

Thanks

Mark Spritzler
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic