tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From - <...@interoperate.com>
Subject Re: jsp
Date Thu, 01 Jun 2000 15:17:25 GMT
Hi again,
I have 2 virtuals and need some help getting this right. I want my JSP to live
with all the normal website stuff in my apache document roots, and servlets in
the webapp subdirectories. However I am noticing that session vars I set in the
JSP pages in the apache docroot are NULL when referenced in the webapp/ tomcat
servlets etc. Below is my config.

Configuration:

In the General apache config 
AddType text/jsp .jsp
AddHandler jserv-servlet .jsp

Development:
----------------
apache document root = /docdev
ApJServMount /app ajpv12://localhost:8009/appdev
tomcat webapp = webapp/appdev

appdev.xml for its own tomcat instance

<Context path="/appdev" docBase="webapps/appdev" debug="0"reloadable="true" >
</Context>
<!-- to handle JSP files in the apache document root -->
<Context path="" docBase="/docdev" debug="0" reloadable="true" >
</Context>


Production
-------------
apache document root = /docprod
ApJServMount /app ajpv12://localhost:8007/appprod
tomcat webapp = webapp/appprod


appprod.xml for its own tomcat instance

<Context path="/appprod" docBase="webapps/appprod" debug="0"reloadable="true" >
</Context>
<!-- to handle JSP files in the apache document root -->
<Context path="" docBase="/docprod" debug="0" reloadable="true" >
</Context>

Does each tomcat "context" even in the same tomcat instance, maintain it own
session information? If so, how do I do what I want to do? I just want to have
a normal website that lives in my apache document roots, I want JSP that lives
there to be processed by tomcat, and I want my servlets to live in a webapp
subdir. Is this not possible? I had this working with jserv.

thanks





On Thu, 01 Jun 2000, you wrote:
> Any jsp or servlet is not required to be under webapps.
> In the context definition in server.xml, you need to set up the
> doc path to where the jsp files are. In this case the doc path
> should use absolute path.
> 
> - wrote:
> 
> > thanks,
> > ok what if I want 2 have 2 virtuals. both with JSP files in their normal apache
> > document roots. However I want each virtual to make sure that the*.jsp files
> > execute in a certain Tomcat context/instance etc. The JSP files do not reside
> > in a tomcat webapp. How do I set this up?
> >
> > thanks
> > -aaz
> >
> > On Wed, 31 May 2000, you wrote:
> > > It is used by all request being forwarded to tomcat that can not
> > > find a matching context. When this happens, tomcat presume
> > > that the path is empty, so that it match the ROOT context.
> > >
> > > --
> > > Hansen Wang
> > >
> > > - wrote:
> > >
> > > > Hi,
> > > > In my apache config I have this setup
> > > >
> > > > ApJServManual on
> > > > ApJServSecretKey DISABLED
> > > > ApJServMountCopy on
> > > > ApJServLogLevel notice
> > > > ApJServDefaultProtocol ajpv12
> > > > ApJServDefaultHost localhost
> > > > ApJServDefaultPort 8007
> > > > ApJServMount default /root
> > > > AddType text/jsp .jsp
> > > > AddHandler jserv-servlet .jsp
> > > >
> > > > Now my apache document root is in
> > > > /home/docroot
> > > >
> > > > I call http://my.server.com/one.jsp
> > > >
> > > > and I get this error:
> > > >
> > > > Error: 404
> > > > Location: /one.jsp
> > > > JSP file "/usr/local/apache/tomcat/webapps/ROOT/one.jsp (No such file
or directory)" not found
> > > >
> > > > What exactly is the webapps/ROOT application? Is this the default one
tomcat
> > > > uses for all JSP requests that are not in a specified context but just
> > > > forwarded from apache?
> > > >
> > > > thanks!
> > > >
> > > > --------------------------------------------------------------------------
> > > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > >
> > >
> > > --------------------------------------------------------------------------
> > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message