GeeCON Prague 2014*
The moose likes JSP and the fly likes Include directve Vs include standard action. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Include directve Vs include standard action." Watch "Include directve Vs include standard action." New topic
Author

Include directve Vs include standard action.

Prasad Tamirisa
Ranch Hand

Joined: Mar 26, 2007
Posts: 130
Hi All,

I know the difference between the include directive and the include standard action. But my question is "which one is most suggested in the real time scenario?".

I heard include standard action is a performance threat to the system as it dispatches the request to some other jsp during runtime. Please comment.
[ May 22, 2008: Message edited by: Prasad Tamirisa ]

Regards,
Durga Prasad
vaibhav srivastava
Greenhorn

Joined: Mar 17, 2008
Posts: 23
Hi durga prasad,

Yes, you are right that while using <jsp:include> there is a performance hit every time the page is called while in case of include directive it happens only once at translation phase. But include directive is prefered mostly when the production starts and their will be no changes in file used in directive, although it will cause your servlet generated file bit lengthy.


Regards <br />vaibhav srivastava<br />SCJP1.5 , SCWCD1.5
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

This FAQ entry should answer your questions:
http://faq.javaranch.com/java/IncludesActionDirective


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Prasad Tamirisa
Ranch Hand

Joined: Mar 26, 2007
Posts: 130
Ben/Vibhav,

Thanks very much. That answered my question.
 
GeeCON Prague 2014
 
subject: Include directve Vs include standard action.