hi here;
i am doing a normal (testing) java web app. currently i am running tomcat4.1 on linux. i have change the port from 8080 to 8888 and i am using context path to point to the source (jsp file) directory.
so, the port 8080 will have a context path look like this:
<Context path="/jsp" docBase="/home/swx/jspAdm" debug="0"
reloadable="true" crossContext="true"/>
so the connection url to point to it will be
http:ip:8888/jsp/login.jsp
my question now is, i have put another version (slightly change the content of jsp) in the dir "/home/csb/jspAdm" is it possible if i want to access it like this
http:ip:7777/jsp/login.jsp
how do i conf in my server.xml???
-
tomcat w/ different connector (7 messages)
- Posted by: Tan Yoke Yew
- Posted on: June 16 2004 02:36 EDT
Threaded Messages (7)
- tomcat can't do that by michael xu on June 16 2004 03:05 EDT
- any idea then? by Tan Yoke Yew on June 16 2004 04:04 EDT
-
any idea then? by Rajasekar Kayamboo on June 16 2004 03:18 EDT
-
any idea then? by Tan Yoke Yew on June 16 2004 09:21 EDT
-
don't need 2 instance of tomcat! need 2 by Quartz Quartz on June 17 2004 09:51 EDT
-
don't need 2 instance of tomcat! need 2 by Tan Yoke Yew on June 17 2004 09:38 EDT
- sample conf by Quartz Quartz on June 22 2004 10:03 EDT
-
don't need 2 instance of tomcat! need 2 by Tan Yoke Yew on June 17 2004 09:38 EDT
-
don't need 2 instance of tomcat! need 2 by Quartz Quartz on June 17 2004 09:51 EDT
-
any idea then? by Tan Yoke Yew on June 16 2004 09:21 EDT
-
any idea then? by Rajasekar Kayamboo on June 16 2004 03:18 EDT
- any idea then? by Tan Yoke Yew on June 16 2004 04:04 EDT
-
tomcat can't do that[ Go to top ]
- Posted by: michael xu
- Posted on: June 16 2004 03:05 EDT
- in response to Tan Yoke Yew
I think tomcat can't do that.
It only supply one port to access when starting. -
any idea then?[ Go to top ]
- Posted by: Tan Yoke Yew
- Posted on: June 16 2004 04:04 EDT
- in response to michael xu
i try b4 to use port 7777, it will still go to the context path which i declared as "/home/swx/jspAdm"
coz wat i want is
port : 7777
refer: /home/csb/jspAdm
port : 8888
refer: /home/swx/jspAdm -
any idea then?[ Go to top ]
- Posted by: Rajasekar Kayamboo
- Posted on: June 16 2004 15:18 EDT
- in response to Tan Yoke Yew
If you want to use different ports for different apps, then you should be running two instances of Tomcat. One listening in 8888 and the other in 7777. but you cannot share the common session et al. -
any idea then?[ Go to top ]
- Posted by: Tan Yoke Yew
- Posted on: June 16 2004 21:21 EDT
- in response to Rajasekar Kayamboo
hi there;
appreciate for ur suggestion.
would it be possible to show me how to do that? (the 2 instance for tomcat thingy?) or maybe u can point me to the url w/ sample?
10s ;) -
don't need 2 instance of tomcat! need 2[ Go to top ]
- Posted by: Quartz Quartz
- Posted on: June 17 2004 09:51 EDT
- in response to Tan Yoke Yew
Server has 1..n service
Service has n connectors and 1 engine
Engine has 1..n hosts
Host has 1..n context
All connectors belong to service and can reach all host and context underneath.
For 2 connectors to reach only their own host/context, you need 2 services with 1 connector.
If you really want only 1 service with 2 connectors over 1 host with 2 contexts, you must create your own javax.servlet.Filter in front of your contexts, one that returns 403 (forbidden) if server port doesn't match the context path requested. -
don't need 2 instance of tomcat! need 2[ Go to top ]
- Posted by: Tan Yoke Yew
- Posted on: June 17 2004 21:38 EDT
- in response to Quartz Quartz
Hi Quartz;
is it possible u able to show me ur example?
i really need ur guidance.
appreciate ;)
rgd/ yoke yew -
sample conf[ Go to top ]
- Posted by: Quartz Quartz
- Posted on: June 22 2004 10:03 EDT
- in response to Tan Yoke Yew
<Server port="8005" shutdown="SHUTDOWN" debug="1">
[ ....... std crap: loggers, listeners, naming stuff .....]
<Service name="aaaaa">
<Connector port="7777" ...... />
<Engine name="TrueSight" defaultHost="localhost">
<Host name="localhost" appBase="/home/csb" ....... >
<Context path="/jsp" docBase="/home/csb/jspAdm" ...... />
</Host>
</Engine>
</Service>
<Service name="bbbbb">
<Connector port="8888" ....... />
<Engine name="TrueSight" defaultHost="localhost">
<Host name="localhost" appBase="/home/swx/jspAdm" ......... >
<Context path="/jsp" docBase="/home/swx/jspAdm" ........ />
</Host>
</Engine>
</Service>
</Server>