You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Brown <dw...@webitplanet.com> on 2002/11/23 17:35:22 UTC
Re: apache and tomcat and a webapp
Ron Smits writes:
> This might not even be possible but I cannot find a definitive yes or no
> answer
>
> I am developing a webapp based on jsp and servlets. Once this is done I
> want to deploy it on a server that has several domains on it. Currently
> this server is running apache with JServ.
>
> My idea is to have apache 2.0.X together with tomcat 4.1.12 to take over
> this work. I have managed to get apache to talk to tomcat using the
> mod_jk connector. But I can only access my application by using the
> application path (http://localhost/application/) instead of having
> served up as the root of the virtual host (http://localhost/).
>
> How to go about this?
>
> Ron Smits
> rons@ronsmits.com
>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
Hello, u could use an index.html at: http://localhost that redirects to
http://localhost/application or define an alias in httpd.conf. i assume u
mean a jakarta-tomcat context "application" properly defined in web.xml. u
really don't want jserv defined in httpd.conf along w/ mod_jk. the
"ready-to-go" tomcat webapps demos r perfect if u r using the ant builds. u
really should supply more info w/ such requests (on some ml's u get yelled
at 4 requests like this):
OS:
TOMCAT VERSION:
JDK:
HARDWARE:
ENVIRONENT:
NETWORK:
thanx, david.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: apache and tomcat and a webapp
Posted by David Brown <dw...@webitplanet.com>.
Ron Smits writes:
> Let me try and be more specific :)
>
> First of all, if I get all to work the current setup with JServ will
> disappear and I am testing this in a test environment (Vmware)
>
> So let me see if I can chop my questions up in different parts
> The application is being developed using tomcat 4.1.12 running
> standalone. The development is going nice and contacting the application
> on localhost:8080/application is perfect.
>
> Question 1:
> I want the application to be the root of the tomcat. Meaning that in my
> test environment when I contact localhost:8080 I get the application and
> not the standard Tomcat page.
> I edited the server.xml and changed the Root context to point to the
> application:
> <Context path="" docBase="application" debug="0"/> I even removed the
> ROOT directory. When starting this up going to localhost:8080 will give
> me a "No context configured to process this request" If I go to
> localhost:8080/application my application is there. So how do I change
> this?
>
> Because the current server that needs to be replaced is running several
> domains in a virtual setup (and very nicely too thanks to apache). My
> idea is to remove the current 1.3 install with JServ and replace it with
> apache 2.0.43 that will run all the virtual hosts and will talk to
> tomcat for the web application (see question 1) that will be in a new
> virtual host. So after I have been able to get question 1 answered
> (replacing the root context with my application) the next question will
> be what the best way is of setting mod_jk up to serve up the application
> when apache gets a request for this application.
>
> I hope this is more clearer
>
> Ron
>
> PS to fullfill the list:
> OS linux version 2.4.19
> TOMCAT 4.1.12
> JDK: jsdk1.4.1_1
> Hardware never enough but it is a big enough intel box :)
> Network: running fine, thank you :)
>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
Hello Ron, server.xml is strictly config and removing the ROOT context is
not a good idea. just replace the guts of the ROOT context w/ what u want.
if u already have a http://localhost/application running then either move it
to the ROOT context or just change the ROOT/index.html to index.jsp and use:
response.sendRedirect("http://"+request.getHeader("host")+request.getContext
Path()+"/application". better yet build a "director" servlet at ROOT that
automatically re-directs http to the desired "/application" based on its
context. hope this helps, david.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: apache and tomcat and a webapp
Posted by paul miller <pa...@yahoo.com>.
We switched from JServ to tomcat about 2 months ago.
for our production setup we use mod_webapp
and set the appBase to be the apache web_root.
<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8008" minProcessors="5" maxProcessors="75"
enableLookups="false" appBase="/var/www/html"
acceptCount="10" debug="0"/>
This means that every thing goes through apache (a must)
and that tomcat serves all the content (Its all servlets and JSP)
Which may not be at all what you want.
--- Ron Smits <ro...@ronsmits.com> wrote:
> Let me try and be more specific :)
>
> First of all, if I get all to work the current setup with JServ will
> disappear and I am testing this in a test environment (Vmware)
>
> So let me see if I can chop my questions up in different parts
> The application is being developed using tomcat 4.1.12 running
> standalone. The development is going nice and contacting the application
> on localhost:8080/application is perfect.
>
> Question 1:
> I want the application to be the root of the tomcat. Meaning that in my
> test environment when I contact localhost:8080 I get the application and
> not the standard Tomcat page.
> I edited the server.xml and changed the Root context to point to the
> application:
> <Context path="" docBase="application" debug="0"/> I even removed the
> ROOT directory. When starting this up going to localhost:8080 will give
> me a "No context configured to process this request" If I go to
> localhost:8080/application my application is there. So how do I change
> this?
>
> Because the current server that needs to be replaced is running several
> domains in a virtual setup (and very nicely too thanks to apache). My
> idea is to remove the current 1.3 install with JServ and replace it with
> apache 2.0.43 that will run all the virtual hosts and will talk to
> tomcat for the web application (see question 1) that will be in a new
> virtual host. So after I have been able to get question 1 answered
> (replacing the root context with my application) the next question will
> be what the best way is of setting mod_jk up to serve up the application
> when apache gets a request for this application.
>
> I hope this is more clearer
>
> Ron
>
> PS to fullfill the list:
> OS linux version 2.4.19
> TOMCAT 4.1.12
> JDK: jsdk1.4.1_1
> Hardware never enough but it is a big enough intel box :)
> Network: running fine, thank you :)
>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus � Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: apache and tomcat and a webapp
Posted by Ron Smits <ro...@ronsmits.com>.
Let me try and be more specific :)
First of all, if I get all to work the current setup with JServ will
disappear and I am testing this in a test environment (Vmware)
So let me see if I can chop my questions up in different parts
The application is being developed using tomcat 4.1.12 running
standalone. The development is going nice and contacting the application
on localhost:8080/application is perfect.
Question 1:
I want the application to be the root of the tomcat. Meaning that in my
test environment when I contact localhost:8080 I get the application and
not the standard Tomcat page.
I edited the server.xml and changed the Root context to point to the
application:
<Context path="" docBase="application" debug="0"/> I even removed the
ROOT directory. When starting this up going to localhost:8080 will give
me a "No context configured to process this request" If I go to
localhost:8080/application my application is there. So how do I change
this?
Because the current server that needs to be replaced is running several
domains in a virtual setup (and very nicely too thanks to apache). My
idea is to remove the current 1.3 install with JServ and replace it with
apache 2.0.43 that will run all the virtual hosts and will talk to
tomcat for the web application (see question 1) that will be in a new
virtual host. So after I have been able to get question 1 answered
(replacing the root context with my application) the next question will
be what the best way is of setting mod_jk up to serve up the application
when apache gets a request for this application.
I hope this is more clearer
Ron
PS to fullfill the list:
OS linux version 2.4.19
TOMCAT 4.1.12
JDK: jsdk1.4.1_1
Hardware never enough but it is a big enough intel box :)
Network: running fine, thank you :)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>