473,396 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

jsp - session - how to incorporate session?

27
Hi,

I would like to know how to make use of session to apply in my jsp pages.

My login.html page contains the session codes as follows:-

Expand|Select|Wrap|Line Numbers
  1. <%@page import="java.util.*"%>
  2. <String str = request.getParameter("UserID"));
  3.  
  4. session.setAttribute("UserID", request.getParameter("UserID"));%>
  5. Welcome to <session.setAttribute("UserID").equals("")){%>
  6. <ahref ="login.jsp""><b>Login</b></a>
  7. <%>}
  8.  
However, I'm stuck here. I know that there's a session value which is created for that particular user when he/she first logged in. If not, this person will need to do the login and validate against the user name and password before the user can enter another page.

Now, if this person has login before, I assume that the programme will store the value objects somewhere right? If yes, where is the value objects store?

When the person go to another page, and since the user has logged in before, so no need to do the re-log in. How do I incorporate the session object in another page so that this person doesnt need to re-login.

Advice on the above is greatly appreciated.
Feb 10 '10 #1
0 1222

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Golf Nut | last post by:
hello all! I would like to create a session class which would transparently handle sessions as well as serialize, encode and compute an md5 hash of all $_REQUEST information. This would...
0
by: Michel | last post by:
I was successfully able to compile and incorporate an HTML Help file into my Access database. However, the only way that I was able to do this was by repeating the name of the HTML Help file...
20
by: ctyrrell | last post by:
Does anyone have any idea how to recover from a run-time error 3002 which I get after creating a workspace 242 times? Or better yet, avoid getting it in the first place? I am creating a...
1
by: Javier Estrada | last post by:
I have a source-code library, that provides header and source files (similar to MFC). What would be a good way to automatically incorporate it into other projects? The way I do it today is by...
7
by: Japhy | last post by:
Hello, I need to save values typed into forms across several scripts, before the user actually 'submits' the form to update the mysql db. I have been exploring ways to do this, and looking for...
11
by: Kevin | last post by:
I have a problem I'm trying to figure out how to resolve in Access. I have a volunteer database for a project which occurs each year. Currently I have to go in and wipe out the data each year to...
1
by: NarutoFanatic | last post by:
Hi, Im currently updating our email sending functionality of our application. The website is written in classic asp and all codes are really a mess. anyway my problem is that our current process...
10
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
I've been on this for a while, and cannot figure it out. Can someone please help with this message? SessionState can only be used when EnableSessionState is set to true, either in a...
3
by: Tofubia | last post by:
Hi, This is kinda new to me but I'm desparate for some help on python programming!! I'm currently writing a scrape for a site, but unfortunately, everytime I copy and paste the link into python...
4
by: Yonih | last post by:
Hey Yall, I am trying to incorporate a Once Per session Cookie that will expire once the browser is closed so some one who comes to my website will see my popup the first time her visits the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.