Results 1 to 5 of 5
- 05-04-2010, 12:23 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 16
- Rep Power
- 0
- 05-04-2010, 01:08 PM #2
you write the code so that we can give suggestion.
Ramya:cool:
- 05-04-2010, 03:00 PM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
session.setAttribute()?
- 05-05-2010, 04:08 AM #4
Member
- Join Date
- Apr 2010
- Location
- Philippines
- Posts
- 7
- Rep Power
- 0
I assume your getting the user name from a form. Here's a sample code.
You can call the variable using:Java Code:<% //username here is the name of the text field which you will get the username from String name = request.getParameter("username"); //sessionName is the variable name you assign to the session variable session.setAttribute("sessionName", name); %>
Java Code:<%= session.getAttribute("sessionName") %>
- 05-05-2010, 09:09 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
[SOLVED] logout user when session expires
By sanjeevtarar in forum Java ServletReplies: 12Last Post: 02-23-2010, 12:53 PM -
How to manage a Session for a user in Emailing system using JAVA ?
By balap_chander in forum Java ServletReplies: 1Last Post: 08-27-2009, 11:16 AM -
How do I create session for a user when S/he login and expire the session.
By dpk_vash in forum Web FrameworksReplies: 2Last Post: 12-23-2008, 06:35 PM -
how to use session variable in my problem
By Arif Baig in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 03-27-2008, 07:23 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks