tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: include behavior
Date Sat, 28 Oct 2000 00:26:18 GMT
John Fisher wrote:

> Hi,
>
> Thanks for the response. This produces the same results:
>
> <jsp:include page="common/header.ssi" flush="true" >
> </jsp:include>
>
> Note that header.ssi does not contain executable code, it is basically a
> hunk of html code to be inserted. As such, I don't have any parameters I
> need to pass. Perhaps JSP is trying to execute header.ssi, and the error
> messages are being stiffled somehow?
>

No, what's going on is that the servlet container has no clue that a file with a
"*.ssi" extension is supposed to be a JSP page.

There are two possible approaches to your problem:

* Change file "common/header.ssi" to "common/header.jsp"
  and the above statement will work.  This causes the include
  to happen at runtime (same way that SSI works on web
  servers).

* Use the following directive instead
    <%@ include file="common/header.ssi" %>
  which causes the include to happen at compile time instead.
  This works just like the #include directive in a C program, so
  if you change the header.ssi file contents, you will need to
  manually recompile your JSP page to pick up the changes.

>
> John
>

Craig McClanahan



Mime
View raw message