?
Solved

URLEncoder - parameters in a jsp

Posted on 2002-06-11
4
Medium Priority
?
941 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

752 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