tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Berry" <Craig.Be...@portblue.com>
Subject Jasper - including unbalanced jsp fragment
Date Sun, 20 Jul 2003 01:06:51 GMT
I would like to include static content from one file (call it
header.inc) as part of the jsp text of another (mypage.jsp).
Specifically, header.inc is supposed to include common html, head, and
body content, following which mypage.jsp will contain page-specific
content.  So header.inc contains
 
  <html>
  <head>
  <title>Common title</title>
  </head>
  <body>
 
and mypage.jsp starts with
 
  <%@ include file="header.inc" %>
 
and goes on with the body content, ending with closing tags for body and
html.
 
This fails in jasper with an unterminated tag error at the end of
header.inc.  Of course, there are unterminated tags there (html and
body), but that is intentional; they're terminated in the text of the
full mypage.jsp, post-inclusion.  I had thought that the inclusion was
done first, before page parsing.  Am I missing something?  Surely I
can't be the only person who wants to include unbalanced page fragments,
right?
 
Also, would/can this work for the dynamic inclusion techniques
(c:import, jsp:include)?  I may need those for other purposes, and my
initial experiments ran into similar complaints about unterminated tags.
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message