tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graeme Miller <Grae...@AdvantageGroup.co.nz>
Subject RE: Apache, mod jserv, shtml and Tomcat jsp
Date Mon, 23 Jul 2001 05:44:14 GMT
I agree it would be easy in mod_jk.   Just set up something along the lines
of 

JkMount /*.jsp ajp12 and everything would work fine.

Unfortunately however mod_jk is not an option as this environment has other
virtual hosts in existence that use mod_jserv already.

Basically using jserv everything seems to be working except the execution of
jsp pages when used in a server side include file.  Standalone jsp works
fine and so do server side includes that include other html files.  They
just don't currently work together.

Any ideas people?

> -----Original Message-----
> From: Dmitri Colebatch [mailto:dim@bigpond.net.au]
> Sent: Monday, 23 July 2001 11:16 a.m.
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Re: Apache, mod jserv, shtml and Tomcat jsp
> 
> 
> Hi,
> 
> > - Tomcat as the jsp engine serving all jsp pages
> sounds like you've already got that, albeit not in the typical manner
> 
> > - Apache as the shared webserver serving everything else 
> including shtml
> > files (ie. html with server side includes)
> and I assume this is working as long as you dont need to include the
> output from jsps?
> 
> > - Mod JServ using apj12 as the protocol for apache to talk to tomcat
> have you been through the howto in the tomcat documentation?  
> 
> I can see what you're saying, and it all makes sense, and I also think
> that it would probably be handled by getting mod_jk up and 
> running.  Have
> a read of the tomcat docs in the distribution that you have 
> (what version
> of tomcat and apache do you have btw?  I'm assuming 3.x and 1.3.x).  I
> dont know a lot about the way apache handles shtmls but assume that it
> will process a jsp if it is mounted using a JkMount.
> 
> so in short, see how you go with the howto in the docs and 
> let us know (o:
> 
> cheesr
> dim
> 
> 
> > Unfortunately all the jsp pages are in the same document 
> root as all the
> > html images etc and all links are already set up so I can't 
> just strip out
> > the jsps, put them into a separate directory and set up a 
> context for that
> > directory.  I really need a solution that allows them to 
> stay in place and
> > have tomcat pick up jsps, while Apache picks up the rest.
> > 
> > Currently I managed to achieve the following :-
> > 1) Got apache to pass all files that end in *.jsp through 
> to Tomcat by using
> > a transparent rewrite rule (don't know how to do this using 
> mod_jserv) using
> > the following line
> > 
> > RewriteRule ^/(.*jsp)$ http://myserver:8987/$1 [P]
> > 
> > 2) Got server side includes that include static files only 
> to work using the
> > following lines
> > 
> > Options Includes
> > AddHandler server-parsed .html
> > 
> > However the above will not work if the server side include 
> is a reference to
> > a jsp page.  The uncompiled jsp text will be inlined in the 
> shtml file
> > instead of doing what I want which is to have the jsp page 
> be executed by
> > tomcat and the results being inlined by the server side include
> > 
> > Does anybody know the answer or have any ideas?
> > 
> > Regards,
> > 
> > Graeme.
> > 
> 

Mime
View raw message