http://someplace.com?url=http://somplaceelse.com?one=one&two=two. How can i

GET JUST THIS PART OF THE URLhttp://somplaceelse.com?one=one&two=tworequest.getQueryString() = url=http://somplaceelse.com?one=one&two=twogetQueryString would be OK if it didnt contain url=ThanksAdam
[271 byte] By [adamrau] at [2007-9-26 3:03:52]
# 1

Loos like you are trying to access the URL http://someplace.com

and give it the query parameter url and want the value of that parameter to be http://somplaceelse.com?one=one&two=two

In that case in the code that you use to generate this complete URL, do somethin like this...

String queryParameterValue = java.net.URLEncoder.encode("http://somplaceelse.com?one=one&two");

String actualURL = "http://someplace.com?URL=" + queryParameterValue;

Thats exactly what the class java.net.URLEncoder is for.

neville_sequeira at 2007-6-29 11:04:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hi,

The actual url that I want to get is:

http://someplaceelse.com?one=one&two=two.

Scenario:

I am at http://someplace.com. The user signs in correctly and I want to goto http://somplaceelse.com?one=one&two=two.

Does this make sense?

Adam

adamrau at 2007-6-29 11:04:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

submit the login form on someplace.com to someplaceelse.com?one=one&two=two.

or if someplaceelse.com doesn't process the login, you have to do that yourself, then you could redirect after a successful login to someplaceelse.com using this HTML tag

<META HTTP-EQUIV="REFRESH" CONTENT="0; URL='http://someplaceelse.com?one=one&two=two'">

poopoop at 2007-6-29 11:04:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
[code]String target = request.getParameter("url");String oneVal = request.getParameter("one");String twoVal = request.getParameter("two");response.sendRedirect(target+"?oneVal="+one+"&two="+twoVal);
Breakfast at 2007-6-29 11:04:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...