1 Reply Latest reply on Aug 15, 2010 3:22 PM by nick.x.newman

    Split JSP tag across  <%@include files

    nick.x.newman

      Hi,

       

      I have an application that I am trying to port to JBoss 6.  The JSP pages in this application use the JSP include directive to include a standard header fragment.  The header fragment opens a JSP tag (not just an HTML tag) but leaves it to the main page to close.

       

      The actual code is using JSF tags, but for the purposes of simplification I'll illustrate with a standard JSP action.

       

      header.jsp contains:

                                        <jsp:useBean   id="test"   class="java.util.Date"  >

       

      home.jsp contains:

                                       <%@ include file="header.jsp"  %>

                                       </jsp:useBean>

                                        Current milliseconds = <jsp:getProperty   name="test"   property="time"  />

       

       

      My understanding is that this style of include is like a literal insertion of the contents, and so I would expect this to work (regardless of whether it is good style or not).  However JBoss (or Jasper) throws a compile error, saying that header.jsp contains an unterminated useBean tag.

       

      So two questions:  Is this in fact valid code that should work?  And if so, is there some not-too-painful way that I can get it to work under JBoss 6.

       

      Many thanks,

      Nick