• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Is there any way to get the actual URL

 
Ranch Hand
Posts: 806
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody, I am Chaitanya, I am having a requirement in my application, the application will be sending encrypted links to the registered users. When the user clicks on the link from his mail a new window opens and the userid field will be populated with is id extracted from the encrypted link.

Some times I am getting a '+' symbol in the encrypted link.

When I read the request parameter in the servlet the '+' is being treated as a space.

So what I did is replace all spaces with '+'. It worked fine.

The actual problem is sometimes the encrypted link is too lengthy and is being split in to multiple lines. When the user clicks on it I am getting a '%20' character in the url. So I tried to replace '%20 ' character with ''(null).

But the request.getParameter(String) is taking '%20' character as a space character and is replacing that one also with '+' symbol.

Is there any way to get rid of this?

Is there any way to get the actual url (example: http://localhost:8080/ZZ/http://localhost:8080/ZZ/thrghEncLink?q=epZO02Docm36GKJzI8WxVUO0KbYhJcy2526rmW6/RI75oChwiNkgcojnxtRrYHN8Yv4MvMMnZSN7%20+gcLOP3DZw==)

Thank you all in advance. Have a good day.
 
chaitanya karthikk
Ranch Hand
Posts: 806
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The issue has been solved.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not post your solution so that others may benefit?
 
chaitanya karthikk
Ranch Hand
Posts: 806
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the suggestion Mr. Bear.

Use request.getQuertString() and request.getRequestURL()
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic