Results 1 to 2 of 2
Thread: save global data in servlets
- 05-31-2007, 02:56 PM #1
Member
- Join Date
- May 2007
- Posts
- 38
- Rep Power
- 0
save global data in servlets
sorry about this question but:
How can I save global data in a servlet?
For example, I have a bean(userBean) stored in session that contains the user's information. A servlet receive some parameters in HttpRequest object and read others (for example user id) from Bean and I need that the methods that forms servlets read the data from the session
oSession = request.getSession(true);
oUser = (UserBean)oSesion.getAttribute("oUser");
I have to do this in each method to read the bean?????
Is there any way to avoid this?
thank youLast edited by Marty; 05-31-2007 at 05:57 PM.
- 05-31-2007, 06:38 PM #2
Member
- Join Date
- May 2007
- Posts
- 39
- Rep Power
- 0
Similar Threads
-
How can i save the data Internally(auto save)
By Rama Koti Reddy in forum AWT / SwingReplies: 2Last Post: 11-01-2010, 08:31 PM -
Save data from Excel sheet to servlet
By chandu.v in forum Java ServletReplies: 2Last Post: 04-10-2008, 01:51 PM -
Global constants
By Java Tip in forum Java TipReplies: 0Last Post: 02-17-2008, 09:06 AM -
Declaring global variables
By eva in forum New To JavaReplies: 3Last Post: 12-23-2007, 12:11 AM -
How would I declare the variable numbers as global?
By barney in forum New To JavaReplies: 1Last Post: 08-06-2007, 02:17 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks