You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sophie <sp...@planet.nl> on 2001/09/15 10:08:25 UTC

Again JkMount, Apache and Tomcat

Hi,

I have a question concerning JkMount and the communication from Apache
to Tomcat. Currently I use Tomcat 3.2.x and Apache 1.3.*. When I connect
to Tomcat via port 8080 everything runs fine. But when I try to connect
to port 80 and to use Tomcat via Apache the famous 404 error is
returned.

My web-applications are in the /jakarta-tomcat-3.2.1/webapps/APPL1
directory. In the directory /jakarta-tomcat-3.2.1/webapps/APPL1/WEB-INF
is a web.xml file, that should be used (and is used in case of port
8080). The webapps/APPL1 is a context in my server.xml file (not virtual
host). In the httpd.conf file for apache I have tried to add:
    JkMount / apj13
    JkMount /* apj13
    JkMount /APPL1 apj13
    JkMount /APPL1/ apj13
    JkMount /APPL1/login.jsp apj13
    JkMount /APPL1/*
separately, and in various combinations. Everytime the url
http://domain/APPL1/login.jsp gives the 404 error.

I have gone through a lot of documentation and discussions in this list,
but could not solve the problems. If you have any suggestions then I
would appreciate it very much.

Sophie


Re: Again JkMount, Apache and Tomcat

Posted by Ruben <ru...@yahoo.com.ar>.
hi tonny!
you are a master.. thx you very much!!! now is working ok.
i just add jkmount line in httpd.conf and thats all!
BTW, where i can find the httpservelet class to compile servlets?
thx again
mariano



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


RE: Again JkMount, Apache and Tomcat

Posted by Tony Vinayak <tv...@covalent.net>.
Make sure that:

1. In your httpd.conf file, you have:
JkMount /bookstore/* ajp13

2. I presume this context is installed under $TOMCAT_HOME/webapps directory?
If so, no further updates should be required to the server.xml and
workers.properties files

3. Your workers.properties file is pretty much the default one, with workers
defined for ajp12, ajp13 etc. ?

Also, can' remember what versions of Tomcat / Apache you're using ?

regards,
Tony


-----Original Message-----
From: Ruben [mailto:rukabak@yahoo.com.ar]
Sent: Sunday, September 16, 2001 5:37 PM
To: tomcat-user@jakarta.apache.org; tvinayak@covalent.net
Subject: Re: Again JkMount, Apache and Tomcat


hi tonny,
What i get in apache log is that the file doesn't exists(error.log), which
is very extrange
because i can use it when i point to the port 8080.
the url that apache logs is /bookstore/catalog.
I can use apache+mod_jk.. In fact , i have no problems with jsps file.
what should i edit to make servlets work ok with apache?
thnks
mariano



 _________________________________________________________ Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: Again JkMount, Apache and Tomcat

Posted by Ruben <ru...@yahoo.com.ar>.
hi tonny,
What i get in apache log is that the file doesn't exists(error.log), which
is very extrange
because i can use it when i point to the port 8080.
the url that apache logs is /bookstore/catalog.
I can use apache+mod_jk.. In fact , i have no problems with jsps file.
what should i edit to make servlets work ok with apache?
thnks
mariano




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


RE: Again JkMount, Apache and Tomcat

Posted by Tony Vinayak <tv...@covalent.net>.
Mariano,

404 usually means the request never quite made it to Tomcat at all, and is
usually a JkMount-related error.

- What is the error in your Apache access log? What URL is getting logged?
- If you deploy a servlet context under $TOMCAT_HOME/webapps directory (e.g.
in a subdirectory $TOMCAT_HOME/webapps/myapp), then you can access it from
browser as http://YourServer/myapp , and the corresponding setting in
httpd.conf will be:
JkMount /myapp ajp13
JkMount /myapp/* ajp13

ajp13 is the predecessor to ajp12, and is the newer, more secure protocol.
Of course, you can still use ajp12. Make sure that  the ajp13 connector is
defined in your server.xml; by default it is.

Hope that helps.

- Tony

-----Original Message-----
From: Ruben [mailto:rukabak@yahoo.com.ar]
Sent: Saturday, September 15, 2001 12:08 PM
To: tomcat-user@jakarta.apache.org; tvinayak@covalent.net
Subject: Re: Again JkMount, Apache and Tomcat


hi Tony
i finally make tomcat work for jsp pages, but i'm still having problems with
servlet. I only make work myapp demo servelt, wich comes with tomcat but not
other servlet. BTW, this servlet only works if i call if from port 8080.
If i try to connect via the normal way(i hvae apache 1.3.2 configured with
tomcat) i have 404 page.
I check in my mod_jk.conf-auto if i jave Jkmount and it's exits
JkMount /examples/servlet/* ajp12
but pointing to port 8007 (ajp12)
whta could be the problem? what's the difference between Ajp12 and Ajp13?
thnkas in advance
Mariano

 _________________________________________________________ Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: Again JkMount, Apache and Tomcat

Posted by Ruben <ru...@yahoo.com.ar>.
hi Tony
i finally make tomcat work for jsp pages, but i'm still having problems with
servlet. I only make work myapp demo servelt, wich comes with tomcat but not
other servlet. BTW, this servlet only works if i call if from port 8080.
If i try to connect via the normal way(i hvae apache 1.3.2 configured with
tomcat) i have 404 page.
I check in my mod_jk.conf-auto if i jave Jkmount and it's exits
JkMount /examples/servlet/* ajp12
but pointing to port 8007 (ajp12)
whta could be the problem? what's the difference between Ajp12 and Ajp13?
thnkas in advance
Mariano


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: Again JkMount, Apache and Tomcat

Posted by Sophie <sp...@planet.nl>.
Hello Tony,

The URL is http://myserver/APPL1/login.jsp. The jsp file is compiled with
jspc to a servlet and the web.xml file associates /login.jsp with the
servlet-name login. The error in the error.log is File does not exist:
/jakarta-tomcat-3.2.1/webapps/APPL1/login.jsp. As there is no aliasing in
the httpd.conf file and there is in the mod_jk.conf-auto file, this means in
my opinion that the mod_jk.conf-auto file is loaded into httpd.conf
correctly.

I saw other errors in the error.log file:
    Cannot remove module mod_jk.c: not found in module list
I do not know what it means and whether it is bad.

Does this information makes any sense to you. Thank you at least for looking
at it,

Sophie

Tony Vinayak schreef:

> What's the URL you type in the browser to access your servlet? If it is
> http://yourserver/APPL1/yourservlet then you need to have:
>
> JkMount /APPL1/* ajp13
>
> in your httpd.conf
>
> cheers,
> Tony
>
> -----Original Message-----
> From: Sophie [mailto:sponiza@planet.nl]
> Sent: Saturday, September 15, 2001 4:08 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Again JkMount, Apache and Tomcat
>
> Hi,
>
> I have a question concerning JkMount and the communication from Apache
> to Tomcat. Currently I use Tomcat 3.2.x and Apache 1.3.*. When I connect
> to Tomcat via port 8080 everything runs fine. But when I try to connect
> to port 80 and to use Tomcat via Apache the famous 404 error is
> returned.
>
> My web-applications are in the /jakarta-tomcat-3.2.1/webapps/APPL1
> directory. In the directory /jakarta-tomcat-3.2.1/webapps/APPL1/WEB-INF
> is a web.xml file, that should be used (and is used in case of port
> 8080). The webapps/APPL1 is a context in my server.xml file (not virtual
> host). In the httpd.conf file for apache I have tried to add:
>     JkMount / apj13
>     JkMount /* apj13
>     JkMount /APPL1 apj13
>     JkMount /APPL1/ apj13
>     JkMount /APPL1/login.jsp apj13
>     JkMount /APPL1/*
> separately, and in various combinations. Everytime the url
> http://domain/APPL1/login.jsp gives the 404 error.
>
> I have gone through a lot of documentation and discussions in this list,
> but could not solve the problems. If you have any suggestions then I
> would appreciate it very much.
>
> Sophie


RE: Again JkMount, Apache and Tomcat

Posted by Tony Vinayak <tv...@covalent.net>.
What's the URL you type in the browser to access your servlet? If it is
http://yourserver/APPL1/yourservlet then you need to have:

JkMount /APPL1/* ajp13

in your httpd.conf

cheers,
Tony

-----Original Message-----
From: Sophie [mailto:sponiza@planet.nl]
Sent: Saturday, September 15, 2001 4:08 AM
To: tomcat-user@jakarta.apache.org
Subject: Again JkMount, Apache and Tomcat


Hi,

I have a question concerning JkMount and the communication from Apache
to Tomcat. Currently I use Tomcat 3.2.x and Apache 1.3.*. When I connect
to Tomcat via port 8080 everything runs fine. But when I try to connect
to port 80 and to use Tomcat via Apache the famous 404 error is
returned.

My web-applications are in the /jakarta-tomcat-3.2.1/webapps/APPL1
directory. In the directory /jakarta-tomcat-3.2.1/webapps/APPL1/WEB-INF
is a web.xml file, that should be used (and is used in case of port
8080). The webapps/APPL1 is a context in my server.xml file (not virtual
host). In the httpd.conf file for apache I have tried to add:
    JkMount / apj13
    JkMount /* apj13
    JkMount /APPL1 apj13
    JkMount /APPL1/ apj13
    JkMount /APPL1/login.jsp apj13
    JkMount /APPL1/*
separately, and in various combinations. Everytime the url
http://domain/APPL1/login.jsp gives the 404 error.

I have gone through a lot of documentation and discussions in this list,
but could not solve the problems. If you have any suggestions then I
would appreciate it very much.

Sophie