aspose file tools*
The moose likes JSP and the fly likes Multiple User problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Multiple User problem" Watch "Multiple User problem" New topic
Author

Multiple User problem

karthik manick
Ranch Hand

Joined: Aug 25, 2009
Posts: 52
Hi, I created a simple application using JSPs and servlets. Using the IP address in URL, multiple users can login to my application.
When a user logs in to the application, it will browse the database using login id and displays the details in home page.
When the 2nd users logs into the applcation, he is also getting the same details of the 1st user. It looks like, its not browsing again and is showing thesssion values from 1st user.
Please help me in resolving this..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

The most likely cause of such problems is using scriptlet declarations in a JSP -- bad idea, there should be no Java code in modern JSPs at all -- or using instance variables in a servlet.

Check your app for Java code in JSPs. Any you find should be refactored into Java classes.

Check your servlets for instance variables. A single servlet instance serves multiple threads and so must be written to be thread-safe.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
karthik manick
Ranch Hand

Joined: Aug 25, 2009
Posts: 52
Thans a lot Bear.. This issue got resolved once i changed the instance variables to local variables.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple User problem
 
Similar Threads
multiple modular application implemetation using struts
Using default JAAS Mechanism in Websphere makes applications to access the context path of the other
Prevent multiple concurrent logins from same user in clustered env
session issues with multi tabs in a browser
session issue with multi tabs in a browser