Milt and Martin,

Thanks very much for your response!
I would like to put all servlet classes in WEB-INF directory by following
the 
standard, but our people prefer to keep their
original ~/servlets directory for servlet classes.  So what I did was using
Unix symbolic link to let /mytest/WEB-INF/classes --> /mytest/servlets.
It works with Tomcat, but not apache. Any better way to deal with this? 

In mod_jk.conf-local,
I used JkMount /servlets/* ajp12
       JkMount /*.jsp ajp12

Do I need to use JkMount /mytest / 
              or JkMount /mytest/servlets/* /servlets/*  ?  
 I have not done these because I do not know much about the JkMount syntax.

I only revised existing lines in mod_jk.conf.   I used mod_jk.conf-local
because I found mod_jk.conf-auto did not include my setup in server.xml.
Instead,
it only covered everything under $TOMCAT_HOME/webapps into its contexts.  

To make it simple, I did not try to figure out how to change the way
mod_jk.conf-auto
was created, but decided to use mod_jk.conf-local instead.

Thanks for any information!
  
Alice

-----Original Message-----
From: Milt Epstein [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 11:28 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Problem mapping servlets to /servlets/*


On Mon, 23 Apr 2001, Lian, Xiaobu (Alice) (Xiaobu (Alice)) wrote:

> You are right, I did put /mytest under root context in server.xml.
> It works within tomcat, but not with apache. I just found it is hard
> to configure mod_jk.conf if I want to use root as the prefix of
> servlets.  Any recommendations?  Thanks!

I haven't really done this myself, so I'm not sure of the exact
details.  But what did you do to put your servlets in the root
context?  My impression is that the sample tomcat/apache conf file is
already configured to accept URLs without any context name for
serlvets in the root context.  So then all you need do is put your
servlets (i.e. the class file) in the root context's WEB-INF/classes
directory.  (Although since you want to use "/servlets/" instead of
"/servlet/", you may need to change something related to that --
e.g. perhaps another JkMount directive -- but it sounded like you had
already figured out that part of it.)


> -----Original Message-----
> From: Milt Epstein [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 10:40 AM
> To: '[EMAIL PROTECTED]'
> Cc: Allen, Aristotle B (Ari)
> Subject: RE: Problem mapping servlets to /servlets/*
>
>
> On Mon, 23 Apr 2001, Lian, Xiaobu (Alice) (Xiaobu (Alice)) wrote:
>
> > Hi Milt,
> >
> > You are right.  This is exactly what I had experienced.  Please see
> > my previous posted message yesterday (4/22/01) "mod_jk.conf
> > configuration: Access servlets from apache server with url
> > <servername>/servlets/<servlet-class>".
> >
> > I use mod_jk and play with mod_jk.conf-local for a while, but did
> > not fiugure out how to make apache knowing servlets to send to
> > tomcat.  Do you have any ideas about how to configure mod_jk.conf?
> > Thanks a lot!
>
> I went back and looked at your previous post.  Are you saying you want
> to be able to specify the URL without the context name?  That is,
> normally you use URLs of the form:
>
> http:<servername>/<contextname>/servlets/<servletclass>
>
> but you want to use:
>
> http:<servername>/servlets/<servletclass>
>
> Is that correct?
>
> Can't you do this by putting the servlets in the root context?
[ ... ]

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

Reply via email to