You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Foo Shyn <fo...@optegra.com.my> on 2007/03/27 04:27:38 UTC
Apache and Tomcat bridging - Servlet enabled?
Hi,
This question suddenly struck me when i'm trying to solve my server problem. Here goes:
Server settings: Apache 2 as front, Tomcat 4.1 as back, J2SDK 1.4.2
Let say that i'd configure that Apache so that whenever a request for www.abc.com will be redirected to the Tomcat's A context which contain a servlet TestServlet. The web.xml is there.
When i access the www.abc.com/TestServlet , the Apache throws me a 404 error (not Tomcat), which means that the Apache failed to redirect the request to A folder. But when i configure my servlet path as /TestServlet.jsp, and i use the path www.abc.com/TestServlet.jsp (not a jsp page!) to access the servlet, i manage to do so.
Is this some settings problem on Apache? or my Tomcat problem?
Thanx.
Regards,
FooShyn
Re: Apache and Tomcat bridging - Servlet enabled?
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Foo Shyn wrote:
> Hi,
>
> This question suddenly struck me when i'm trying to solve my server problem. Here goes:
>
> Server settings: Apache 2 as front, Tomcat 4.1 as back, J2SDK 1.4.2
> Let say that i'd configure that Apache so that whenever a request for www.abc.com will be redirected to the Tomcat's A context which contain a servlet TestServlet. The web.xml is there.
>
> When i access the www.abc.com/TestServlet , the Apache throws me a 404 error (not Tomcat), which means that the Apache failed to redirect the request to A folder. But when i configure my servlet path as /TestServlet.jsp, and i use the path www.abc.com/TestServlet.jsp (not a jsp page!) to access the servlet, i manage to do so.
>
> Is this some settings problem on Apache? or my Tomcat problem?
>
most likely you are using mod_jk, and have configured .jsp to be forwarded.
Look for
JkMount *.jsp
in your httpd.conf file
Filip
> Thanx.
> Regards,
> FooShyn
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 3/25/2007 11:07 AM
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Apache and Tomcat bridging - Servlet enabled?
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
FooShyn,
Foo Shyn wrote:
> Server settings: Apache 2 as front, Tomcat 4.1 as back, J2SDK 1.4.2
> Let say that i'd configure that Apache so that whenever a request for
> www.abc.com will be redirected to the Tomcat's A context which
> contain a servlet TestServlet. The web.xml is there.
Redirected? Or are you using mod_jk or mod_proxy_ajp, or even
mod_proxy_http? Typically, fronting Tomcat with Apache does not use
redirection.
> When i access the www.abc.com/TestServlet , the Apache throws me a
> 404 error (not Tomcat), which means that the Apache failed to
> redirect the request to A folder. But when i configure my servlet
> path as /TestServlet.jsp, and i use the path
> www.abc.com/TestServlet.jsp (not a jsp page!) to access the servlet,
> i manage to do so.
We would need to see your configuration to tell you what might be going
wrong. If you are using proxying or mod_jk, then you will have to map
/TestServlet to go to Tomcat. I'm guessing that you have a mapping for
/*.jsp, but not other things.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGCINq9CaO5/Lv0PARAoDJAJ9/w9jqScIC70OxrNEvykIJhGsnlQCgl6mL
9axR3MwwraNg7kIZ+rnrovo=
=6W9B
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org