• Post Reply Bookmark Topic Watch Topic
  • New Topic

accessing same web page by multiple user simultaneously

 
mikali singh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while i working on web application project i get struck at a point that how i can make coding for access the same web page by multiple user at the same time.
so, please help me by providing source code in servlet so that i will continue for my project...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65661
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you write your servlet badly (by using instance variables, for example), you don't need to do anything special to handle multiple requests.

Be aware that all users will share application scope.
 
Anurag Verma
Ranch Hand
Posts: 168
Hibernate Spring Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree to bear, you just need "not to have" instance variables in servlets, & write your code in overridden do*** methods in your servlet. Things should go well.
 
Saif Asif
Ranch Hand
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Avoid instance variables in the servlet and it will be fine
 
mikali singh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Unless you write your servlet badly (by using instance variables, for example), you don't need to do anything special to handle multiple requests.

Be aware that all users will share application scope.

if all users will share session scope then it will work or not? if not, then please explain why??
 
Albareto McKenzie
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
session scope is unique per user, application scope is shared, have a look at this link:

http://docs.oracle.com/javaee/6/tutorial/doc/gjbbk.html
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!