• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet of a JSP

 
yash Vi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We all know that a JSP page is converted to a Servlet.how many servlets will be present for a JSP page servicing multiple clients
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1
 
yash Vi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the information.Can you please explain how it works or please give some links which give explanation on the same
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And the award for the world's shortest, yet correct, answer goes to Bear!
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a JSP is compiled into a servlet, only one servlet is made. This will then act like every other servlet, where a new thread is started for each request.

If you are still curious about how this works, check out this post from the Servlets forum or look at the servlet specs themselves.
 
yash Vi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be clear,The JSP Page is converted to one servlet but many servlet Instance.If I havent got it wrong
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, one servlet instance that handles one thread per request.
Servlets are multi threaded.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic