You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Eric Miller <je...@uchicago.edu> on 2005/04/25 19:48:32 UTC

Possible to include JSP document (.jspx) fragments that aren't well formed?

Does anyone know if it's possible to include a .jspx fragment in another 
.jspx file? When I say .jspx fragment, I mean a file that is in XML format, 
but, may not be well formed.

For example, I want to do something like the following. Currently, I'm 
receiving an error message like the following. I think what it's doing is 
assuming that the included files are .jsps instead of .jspxs. Previously, I 
tried naming the included files as .jspx, but, then, when I tried to compile 
it with Jasper, it wouldn't compile because it said the documents needed to 
be well formed. I need to see if I can figure out how to tell the jasper Ant 
task to only compile the page.jspx instead of all files ending with .jspx.

Does anyone know if it's possible to include .jspx fragments? i.e. ones that 
aren't well formed, or, do they have to be well formed? If the later is 
true, using JSPXs makes includes a lot less useful...

The goal here is to use XML syntax throughout and still have flexibility in 
using includes.

J:\at\reservations\build.xml:204: org.apache.jasper.JasperException: 
file:J:/at/
reservations/build/header.jspxf(9,7) &lt;jsp:output&gt; must not be used in 
standard syntax

page.jspx
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:directive.include file="../header.jspxf"/>
<p>Hello, world!</p>
<jsp:directive.include file="../footer.jspxf"/>
</jsp:root>

header.jspxf
<html>
<title>...
<body>...

footer.jspxf
</body>
</html>

Jon 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org