my dog learned polymorphism*
The moose likes JSP and the fly likes Is it possible to use [jsp:include] in a JSP Tag File? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Is it possible to use [jsp:include] in a JSP Tag File?" Watch "Is it possible to use [jsp:include] in a JSP Tag File?" New topic
Author

Is it possible to use [jsp:include] in a JSP Tag File?

Matt Raible
author
Ranch Hand

Joined: Jan 11, 2001
Posts: 114
If I use the following in a JSP Tag File, only the 2nd one is processed:



Using <jsp:include> doesn't seem to work in tag files. Is that as designed?

Thanks,

Matt


Matt<br /> <br />Author: <a href="http://springlive.com" target="_blank" rel="nofollow">Spring Live</a> and <a href="http://www.apress.com/book/bookDisplay.html?bID=256" target="_blank" rel="nofollow">Pro JSP</a><br />Weblogs: <a href="http://raibledesigns.com" target="_blank" rel="nofollow">Raible Designs</a> <a href="http://jroller.com/page/raible" target="_blank" rel="nofollow">Spring Live Blog</a>
Matt Raible
author
Ranch Hand

Joined: Jan 11, 2001
Posts: 114
It seems that neither <jsp:include> nor <c:import> (or Struts 2's <s:import>) work in tag files. I'm fine with using "include file", but how do I specify a dynamic value for the file attribute?

The following doesn't work:

Matt Raible
author
Ranch Hand

Joined: Jan 11, 2001
Posts: 114
Sorry for the noise, it turns out it was caused by the fact that Tomcat (5.0.25) did not have a mapping for .jspf.

Matt
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

Files included using the include action are complete JSP files and should be named .jsp. Fragments included with the include directive are named .jspf.
[ August 24, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to use [jsp:include] in a JSP Tag File?
 
Similar Threads
using EL in jsp include file
How can I consolidate some duplicate JSTL code in my JSP?
How do i use JSP include pag tag to include a java class file
Can JSP's include servlets?
Calling JSP with in WEB-INF