Posted By:
Anonymous
Posted On:
Friday, July 4, 2008 02:35 AM
Hi, I would like to know what is the difference between calling a servler using Anchor tag in a JSP and calling using URLConnection. The Basic Requirement : I have a Servlet (Servlet 1 ) in Appserver 1 . I am calling another Servlet (Servlet 2) in App servlet 2 in a new window Using a Link in Servlet 1. I am passing the session id from servlet 1 to servlet 2 My Basic Requirement here is after going to servlet 2 i wanted to fetch the Session of servlet and stop it from invalidating.. Now in Servlet 2 : Condition 1 : If i use a Anchor Tag and call servlet 1 as a Url then I am able
More>>
Hi,
I would like to know what is the difference between calling a servler using Anchor tag in a JSP and calling using URLConnection.
The Basic Requirement :
I have a Servlet (Servlet 1 ) in Appserver 1 . I am calling another Servlet (Servlet 2) in App servlet 2 in a new window Using a Link in Servlet 1. I am passing the session id from servlet 1 to servlet 2
My Basic Requirement here is after going to servlet 2 i wanted to fetch the Session of servlet and stop it from invalidating..
Now in Servlet 2 :
Condition 1
:
If i use a Anchor Tag and call servlet 1 as a Url then I am able to fetch the old session and revalidate it.. I am sending jsession id in the url.
Url looks something like this
:
http://
:
/
/ServletName;jsessionid=
?
In this case in the Servlet I am getting the following :
isRequestedSessionIdFromCookie = true
Instead of Anchor Tag if i use URLConnection object to call the Same url as above I am not able to get the existing session in servlet 1..
In this case in servlet 1 i am getting
isRequestedSessionIdFromCookie = false
The Following is things i have set in URLConnection..
objURLConnection.setRequestProperty( "Referer", conHeader );
objURLConnection.setDoOutput(false);
objURLConnection.setDoInput(true)
Kindly help me in Solving this issue.
Thanks
Venkatesh S
<<Less