Networking - retrieve URLConnection Object

I have 2 applications(war) talking with each other.

From one application(consumer), I want to open a URL connection so I am doing something like this:

URL url =new URL("http://1.1.10.13:9083/portal/site/pocpilot/template.AmpfAPOBO") ;

oboConnection = url.openConnection();

//Adding the header information while making the http request

Enumeration headers = request.getHeaderNames() ;

while( headers.hasMoreElements() )

{

String headerName =( String )headers.nextElement() ;

String headerValue=( String )request.getHeader( headerName ) ;

oboConnection.addRequestProperty(headerName,headerValue);

}

oboConnection.connect();

Now when my other servlet is invoked, how to getthis URL Connection object. From there I can call getRequestProperty and get my values back in a map. but on the other servlet hand, how to get the URLConnection object.

[1214 byte] By [chintan.inda] at [2007-11-26 23:02:27]
# 1
I don't understand the question. You can't get the URLConnection inside the servlet, but you don't need it because you have the Request. You've just shown how to get it in the client. So where do you need it?
ejpa at 2007-7-10 13:53:00 > top of Java-index,Core,Core APIs...