tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Prantzalos <dprantza...@netscape.net>
Subject jsp:include inside a custom tag
Date Thu, 15 Jun 2000 14:30:45 GMT
Folks,

Has anyone tried to use a <jsp:include> tag inside of a custom tag? For
example here's an example that uses a custom <repeat> tag to repeat the
contents of an included .jsp file.


<test:repeat count='<%= request.getParameter("reps") %>'>
 <jsp:include page="my_included_file.jsp" flush="true"/>
</test:repeat>


When I run this, I get the following exception:


javax.servlet.ServletException: Illegal to flush within a custom tag
        at  
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
...


If I take the "flush='true'" attribute out, then I get the following
exception:


org.apache.jasper.JasperException: Invalid jsp:include tag
        at
org.apache.jasper.compiler.IncludeGenerator.(IncludeGenerator.java:95)
...


If I use the static include, this works fine, for example:


<test:repeat count='<%= request.getParameter("reps") %>'>
 <%@ include file="my_included_file.jsp" %>
</test:repeat>


.. but this compiles the included file in with the servlet, and doesn't show
any changes in the included file unless I recomiple the server page that it
was included in.

I want to be able to modify the included file and have it show up in all
server pages that include that file WITHOUT having to recompile all the server
pages that included the file.

Any idea's how to do this?


Thanks,

-jim


____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.

Mime
View raw message