Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:include and include directive

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Can jsp:include or jsp:forward and include directive fetch content from a different application within the same container.

I know that they cant go outside the container..

Regards
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no I think for that u have to use a JSTL tag in ur JSP.I dont remember which one
 
Manikandan Jayaraman
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spec Says ...


A <jsp:include .../> element provides for the inclusion of static and dynamic resources in the same context as the current page.



A <jsp:forward page=´┐ŻurlSpec´┐Ż /> element allows the runtime dispatch of the
current request to a static resource, a JSP page or a Java servlet class in the same context as the current page.


Extrapolation
I dont think include directive can go out of context to include a file. Simply to guess, when standard actions that are dynamic in nature cannot include out-of-context contents, how can a translation-time directive do!

Am I Right?
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Renu,

no I think for that u have to use a JSTL tag in ur JSP.I dont remember which one


The tag you are referring is ...

<c:import url="...."/>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic