Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

default implementation of JSPs

 
Ganapathi Srinivasan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
I know that internally a JSP is represented as a servlet.
My question is that when a servlet is generated for a JSp it is by default multiThreaded(again i think so...)
Just as i can make my servlet implement SingleThreaded model can i specify it in my JSP to make the servlet generated internally implement Single Threaded model? if yes how?
Thanks,
Ganapathi.
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ganapathi,
if you want to denote that your jsp is not thread safe, add isThreadSafe="false" to the declaration at the top of you page:
<%@ page language="java" import=etc isThreadSafe="false"% ...rest of declarration>
if you do this, the server will queueu requests so that only one is answered at a time
chanoch
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic