Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 9th, 2004, 05:02 PM
Registered User
 
Join Date: Jul 2004
Location: Fairfax, Virginia, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session is not getting Transferred in servlets.

Dear Sir/madam,

I am developing my school project where I have to maintain a login form(invokes Login servlet) which contains the lastname of the user. I am setting this using

 HttpSession session = request.getSession(true);
                                if(session.isNew() == false)
                                {
                                        session.invalidate();
                                  session = request.getSession(true);
                                }
 System.out.println("Session in first servlet second time
is:"+session.toString());

           session.setAttribute("lastname",sel2);

then after submitting this info user will have a "HTML LINK" to go into a DIFFERENT "html file" which invokes Servlet with name "LOGGED" after clicking on submit

I got the session attribute in LOGGED servlet as such here

 HttpSession session = request.getSession();
 String lastname = (String)session.getAttribute("lastname");

 System.out.println(lastname);

when I print this I m getting null into it. I m unable to understand whats wrong with this. I have done the same thing day before yesterday and it worked but it surprisingly giving me "NULL" when I m testing this today morning. Could anyone please throw light on this.I would be very grateful.

Thank You
Sai Krishna
Reply With Quote
  #2 (permalink)  
Old July 9th, 2004, 11:57 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cochin, Kerala, India.
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

This seems to be a wrong post. Please post this issue to the forum Java / Beginning JSP.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box dependent transferred to another form Ebaad Access VBA 1 May 17th, 2007 12:50 PM
Servlets achukuttan Servlets 1 March 26th, 2007 02:04 AM
constructor in servlets bondalapati98 Servlets 5 January 16th, 2006 12:27 AM
Capturing date from transferred file Axxess Access VBA 2 July 18th, 2005 05:21 AM
Email using servlets sonurijs Pro JSP 3 March 11th, 2005 02:37 PM



All times are GMT -4. The time now is 10:36 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.