Solved

URLEncoder - parameters in a jsp

Posted on 2002-06-11
4
933 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
Comment Utility
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
Comment Utility
Did that work for you?
0
 

Author Comment

by:soamai_dmeetoo
Comment Utility
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
Comment Utility
Glad I could help and Thanx for the "A".

CJ
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now