Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

URLEncoder - parameters in a jsp

Posted on 2002-06-11
4
Medium Priority
?
942 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

618 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