This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Include directve Vs include standard action.
 
Similar Threads
jsp:include standard action
problem with include files
jsp:include and include directive
Using jsp:useBean across JSPs
include file in jsp