You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stuart Allen <sa...@steptwo.com.au> on 2001/10/18 02:53:48 UTC

Migrating from Tomcat 3.2 to 4.0.1

I have recently installed Tomcat 4.0.1 and mod_webapp and I am trying to 
get an application working that was previously running under Tomcat 3.2. 
The problem is that the *.html pages contain <jsp:include> tags that are 
not being parsed and processed. I have tried changing the mappings in 
web.xml so that the default servlet is jsp, but the tags still seem to be 
ignored. Previously I had added a line like: JkMount /*.html ajp13 in the 
Apache config, but obviously this does not apply to mod_webapp. Any clues 
would be greatly appreciated.

Regards,
Stuart


Re: Migrating from Tomcat 3.2 to 4.0.1

Posted by Stuart Allen <sa...@steptwo.com.au>.
Hi, Jeff, thanks for your reply.

At 10:11 19/10/2001 +1000, you wrote:
>On Thu, Oct 18, 2001 at 10:53:48AM +1000, Stuart Allen wrote:
> > I have recently installed Tomcat 4.0.1 and mod_webapp and I am trying to
> > get an application working that was previously running under Tomcat 3.2.
> > The problem is that the *.html pages contain <jsp:include> tags that are
> > not being parsed and processed.
>
>Could you elaborate on that? What exactly is your tag, and is there any error
>message?

The application consists of a series of HTML pages that have servlets 
embedded as
various points, for example:

<p>Welcome <b>
<jsp:include page="/servlet/com.steptwo.intranet.servlets.UserName" 
flush="true">
</jsp:include>

is a snippet from the front page. When I view this page I do not receive 
any errors at all, the tags just appear in the source of the HTML without 
the servlets have been executed.

>Does it work with Tomcat standalone (port 8080)? If it does, then all the 
>above
>is not your problem.

The sample apps that come with Tomcat worked fine on 8080.

Regards,
Stuart


Re: Migrating from Tomcat 3.2 to 4.0.1

Posted by Jeff Turner <je...@socialchange.net.au>.
On Thu, Oct 18, 2001 at 10:53:48AM +1000, Stuart Allen wrote:
> I have recently installed Tomcat 4.0.1 and mod_webapp and I am trying to 
> get an application working that was previously running under Tomcat 3.2. 
> The problem is that the *.html pages contain <jsp:include> tags that are 
> not being parsed and processed.

Could you elaborate on that? What exactly is your tag, and is there any error
message?

With Tomcat 4.0 and 4.0.1, <jsp:include>'ing *any* file with an unknown MIME
type will trigger an IllegalStateException. I encountered this when migrating
3.2 apps to 4.0, with lines like:

<jsp:include page="foo.ssi" flush="true"/>
<jsp:include page="foo.htm" flush="true"/>
<jsp:include page="foo.js" flush="true"/>
<jsp:include page="foo.css" flush="true"/>

The fix is to declare the MIME types of those file types in your web.xml.

Tomcat 4.0.1 has *.js and *.css MIME types declared in it's global web.xml, so
the problem is less evident.

FAQ on this issue at:
http://www.jguru.com/forums/view.jsp?EID=516840

> I have tried changing the mappings in web.xml so that the default servlet is
> jsp, but the tags still seem to be ignored. Previously I had added a line
> like: JkMount /*.html ajp13 in the Apache config, but obviously this does not
> apply to mod_webapp. Any clues would be greatly appreciated.

Does it work with Tomcat standalone (port 8080)? If it does, then all the above
is not your problem.

--Jeff

> Regards,
> Stuart