This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

accessing same web page by multiple user simultaneously  RSS feed

 
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: 66203
151
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: 170
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!