• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Creation

 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
How many servlets are created on compilation when we use :
1. Static Include
2. Dynamic Include ??
I think for (1), only 1 servlet is created as the content of the included file is inserted in the JSP.
But for (2), I am really confused.
TIA
MB
 
Chandra Bairi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In static include what happens is the code from the file is directly included in the page and as a result only one servlet is generated.

In the case of the dynamic include the servlet which has to be included is loaded dynamically when the code from the particular jsp page has to be included and hence two servlets are created.
hope this helps and incase i am wrong please let me know.
Shekar.
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
Can there be more that one dynamic includes..and in that case more that 2 servlets will b generated ??
aw thnx shekar
MB
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic