Hello all.

First off, here are my specs:

Windows XP Professional Edition
Tomcat 6.x
Java EE Project
Eclipse

So, as stated in the title, I am having some issues regarding the use of SSI
and my JSP pages. Currently, I am taking my website that was done for me
many years ago, and turning it from a static site into a dynamic one. The
first thing I did was start using SSI for the html footers and table of
contents/sidebars.

Here's my web.xml:

<servlet>
    <servlet-name>ssi</servlet-name>
    <servlet-class>
      org.apache.catalina.ssi.SSIServlet
    </servlet-class>
    <init-param>
      <param-name>buffered</param-name>
      <param-value>1</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>expires</param-name>
      <param-value>666</param-value>
    </init-param>
    <init-param>
      <param-name>isVirtualWebappRelative</param-name>
      <param-value>0</param-value>
    </init-param>
    <load-on-startup>4</load-on-startup>
</servlet>
    
<servlet-mapping>
    <servlet-name>ssi</servlet-name>
    <url-pattern>*.html</url-pattern>
    <url-pattern>*.htm</url-pattern>
    <url-pattern>*.jsp</url-pattern>
</servlet-mapping>

This is working exactly as expected. I have a file named index.html that has
this within it:

<!-- Table Of Contents Include File -->
<!--#include file="toc.inc" --> 

And it works just fine. It includes the file, "toc.inc", and renders it on
index.html as expected. Now, it turns out that index.html will be turned
into index.jsp. After I made the changed, things still worked. However, when
I tried to add some jsp code, that is where things fell apart.

For reasons that I don't understand, the jsp code just isn't working.
However, when I take it out of the <url-pattern>, it works just fine. Of
course, then the ssi doesn't work on those pages. Here's an example of a jsp
file that I used for testing:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My Title</title>
</head>
<body>
Hello... The time is now <%= new java.util.Date() %>
Context root = <%= application.getContextPath() %>
</body>
</html>

When jsp is taken out of <url-pattern>. it returns the time, and the context
path perfectly. When I add it back though, I just get whitespace.

Any ideas?
-- 
View this message in context: 
http://www.nabble.com/Issue-With-SSI-And-JSP-tp25707397p25707397.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to