You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alexander Kogan <ko...@ptc.com> on 2000/05/12 18:51:21 UTC

tomcat + apache : new

Hi,

I'm just begin to work with Tomcat + Apache, so please
forgive me if I asked obvious things.

I tried to add new "Context" for my web-appl. I decided
not to put it in standard place $TOMCAT_HOME/webapps/
but into my home directory.

I added following lines in server.xml

...
<Context path="/CdCollection"
docBase="/home/kogan/CdCollection" debug="0" reloadable="true"
>
</Context>

and created web.xml for my application.

Everything works fine inside of tomcat. I can access it as

http://localhost:8080/CdCollection


 But it doesn't work with apache server, because tomcat
produced following lines in  tomcat-apache.conf

Alias /CdCollection
/usr/local/jakarta-tomcat/webapps/CdCollection
<Directory "/usr/local/jakarta-tomcat/webapps/CdCollection">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /CdCollection/servlet /CdCollection
<Location /CdCollection/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

It puts my context into default "webapps" place.

Does anybody know how to work it out?

Thanks in advance.



-- 
_________________________________________________________
Alexander Kogan    Parametric Technology Corporation
kogan@ptc.com      128 Technology Drive, Waltham MA 02453

RE: Compiling New Kernel

Posted by "A. Scott White" <sc...@coderite.com>.
Oops...sorry. I sent this to the wrong place.

=========================================================
A. Scott White - Director, Information Systems
Affiliated Computer Services - Healthcare Solutions Group

> -----Original Message-----
> From: A. Scott White [mailto:scottw@coderite.com]
> Sent: Friday, May 12, 2000 16:52
> To: tomcat-user@jakarta.apache.org
> Subject: Compiling New Kernel
> 
> 
> I have just installed Debian GNU/Linux 2.1 with kernel 2.0.36 and 
> wanted to update the kernel to 2.2


Compiling New Kernel

Posted by "A. Scott White" <sc...@coderite.com>.
I have just installed Debian GNU/Linux 2.1 with kernel 2.0.36 and wanted to
update the kernel to 2.2

I downloaded the source code for the Linux kernel 2.2.15

I was reading the Documentation/Changes document to make sure I had the
necessary versions of the various software packages. I found that the
recommended versions for a couple of packages are newer than the versions
available through dselect. These are:

package     dselect version     recommended version
==========  ==================  ====================
Procps      1.2.9-3             2.0.3
Util-linux  2.9g-6              2.9z

I have updated my dselect packages list, and it appears that no newer
versions are available. Do I need to change my access URL's for dselect? If
so, which are recommended?

Also, the Documentation/Changes document requires procinfo version 16. As
far as I can tell, I do not even have procinfo on my system. It is also not
listed (as far as I can see) in dselect. Is this package important?

Thanks.

=========================================================
A. Scott White - Director, Information Systems
Affiliated Computer Services - Healthcare Solutions Group


Re: tomcat + apache : new

Posted by Steve Weiss <sw...@aamc.org>.
Alexander Kogan wrote:
> 
>  But it doesn't work with apache server, because tomcat
> produced following lines in  tomcat-apache.conf
> 
> Alias /CdCollection
> /usr/local/jakarta-tomcat/webapps/CdCollection
> <Directory "/usr/local/jakarta-tomcat/webapps/CdCollection">
>     Options Indexes FollowSymLinks
> </Directory>
> ApJServMount /CdCollection/servlet /CdCollection
> <Location /CdCollection/WEB-INF/ >
>     AllowOverride None
>     deny from all
> </Location>
> 
> It puts my context into default "webapps" place.
> 
> Does anybody know how to work it out?

There are two ways you can get this to work:

1) Edit tomcat-apache.conf yourself after it is created by Tomcat. Then
rename the file and include that in Apache's httpd.conf, instead of
tomcat-apache.conf.

 or

2) In server.xml, look for the following:

    <!-- Add "home" attribute if you want tomcat to be based on a
different directory
         "home" is used to create work and to read webapps, but not for
libs or CLASSPATH.
         Note that TOMCAT_HOME is where tomcat is installed, while
ContextManager home is the
         base directory for contexts, webapps/ and work/
      -->

  Just after that there is:

    <ContextManager debug="0" workDir="work" >

  After that line, add something like the following:

    <ContextManager home="/home/steve/dev/java" />

You need to make sure that you have subdirectories called "webapps" and
"conf" in that directory. Then, when you start Tomcat, it will create
tomcat-apache.conf in your "conf" directory (not the one where Tomcat is
installed), and this one will have the correct path info. Then you can
include that in httpd.conf. Tomcat will also create a "work"
subdirectory where it puts compiled JSPs.

-Steve


-- 
Steve Weiss      Association of American Medical Colleges
(202)828-0428    mailto:sweiss@aamc.org    http://www.aamc.org