Hey there are two things here
1. first dont get a authentication page using doget.
2. Look carefully at the code, you are using logon.isDone in the doget
method and login.done in the dopost, you might try using
logon.isDone.
Thanks,
Sundar
Jacqueline Ng <[EMAIL PROTECTED]> on 02/10/2000 02:28:43 PM
Please respond to "A mailing list for discussion about Sun Microsystem's
Java Servlet API Technology."
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: S Sundar Rajan/India/IBM)
Subject: Session tracking problem using POST/GET
Hi there,
I'm developing a servlet that dishes out html pages ~50k in size from a SQL
server backend db.
An authentication page first appears to elicit user data, using the GET
method. A session object is set at this point in time.
The user will select data on the form and POST the data.
class servletAuthenticate {
doGet(...)
{
HttpSession session = req.getSession(true);
...
session.putValue("logon.isDone", name);
}
}
class servletResource {
doPOST(...)
{
HttpSession session = req.getSession(true);
ServletOutputStream out = res.getOutputStream();
...
Object = (String) session.getValue("login.done"); ...
}
}
The session object set by the doGet() in the 1st servlet is 'lost'. Is
there any mistake here? or is it a no-no in using session objects across
GET/POST methods?
Thanks.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html