wood burning stoves 2.0*
The moose likes Servlets and the fly likes Will the  browser Session created in the doPost methods be recognised by the doGet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Will the  browser Session created in the doPost methods be recognised by the doGet" Watch "Will the  browser Session created in the doPost methods be recognised by the doGet" New topic
Author

Will the browser Session created in the doPost methods be recognised by the doGet

Milan
Greenhorn

Joined: Mar 05, 2001
Posts: 5
I am a relatively new guy in Servlets and would be higly obliged
if someone can help me with this querry.
I have creted an HttpServletSession in the doPost() method of the Servlet ( for my Project of Online Exam ).
There is a form in the Post method which invokes the doGet() method of the same Servlet .However in the doGet method, the browser session is NOT recognised!Why is it so ?
Morever, The doGet( ) method, than , in turn invokes the doPost( ) of the same Servlet. At this stage, i.e , in the doPost( ) method the browser instance is recognised.
What is the probelem ?


Milan Doshi
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
The session certainly should be available to both the doGet and doPost methods of the servlet. Thats the whole idea after all.
How are you checking for the session in doGet?
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
drop ur code here yaaar....letz cceeee whatz the problem with you
surya
------------------
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Will the browser Session created in the doPost methods be recognised by the doGet
 
Similar Threads
POST or GET
is servlet doGet and doPost method are threadsafe?
HTTP method POST is not supported by this url
Servlet ingheritance property
Servlet- inheritance property