tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Berry" <Craig.Be...@portblue.com>
Subject RE: Jasper - including unbalanced jsp fragment
Date Sun, 20 Jul 2003 03:30:26 GMT
A quick clarification -- this actually only causes problems on
server-side taglib items, like Struts html taglib.  So the problem
occurs when I have

<html:html>

in Header.inc but the close tag is elsewhere.  I would think that Jasper
would be combining the text pieces into one file before the taglib ever
got to see the content, but that's apparently not the case.  Can someone
please explain this?

-----Original Message-----
From: Craig Berry 
Sent: Saturday, July 19, 2003 6:07 PM
To: tomcat-user@jakarta.apache.org
Subject: Jasper - including unbalanced jsp fragment


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.
 

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


Mime
View raw message