Solved

URLEncoder - parameters in a jsp

Posted on 2002-06-11
4
936 Views
Last Modified: 2008-03-10
i have a link like this:
http://localhost/here/jsp/userlogin.jsp

i need to pass the follwoing parameters in the url
nexturl=http://localhost/here/jsp/next.jsp?id=2&action=3

thus, the entire link becomes like this
http://localhost/here/jsp/userlogin.jsp?nexturl=http://localhost/here/jsp/next.jsp?id=2&action=3
right?
once the page userlogin is loaded, it get parameters nexturl and make a redirection to "nexturl"
What really happens is that the parameter "action=3" is lost and of course page is not exceuted as required
What should i do in this caseto avoid this
0
Comment
Question by:soamai_dmeetoo
  • 3
4 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 50 total points
ID: 7070343
try this:

nexturl = java.net.URLEncoder.encode("http://localhost/here/jsp/next.jsp?id=2&action=3");

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7075685
Did that work for you?
0
 

Author Comment

by:soamai_dmeetoo
ID: 7077332
yes thanks. i have try another thing : replacing the "&" by a "|". then replaces it back after getting the parameter. finally i have encoded the url
thanks for the help.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7078579
Glad I could help and Thanx for the "A".

CJ
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some of the SEO trends we might expect in 2017.
The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question