File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Servlet Creation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Servlet Creation" Watch "Servlet Creation" New topic
Author

Servlet Creation

Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
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


Malhar Barai
SOA & Java Book
Chandra Bairi
Ranch Hand

Joined: Sep 12, 2003
Posts: 152
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.


Thanks,
Shekar
Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
Hi...
Can there be more that one dynamic includes..and in that case more that 2 servlets will b generated ??
aw thnx shekar
MB
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Servlet Creation
 
Similar Threads
jsp:include standard action
RequestDispatcher doubts
JSP in class diagram (part 2)
Security
Servlet Context