On 12/26/2013 2:17 PM, Peter wrote:
Thanks *Mark,* Martin Gainty, André Warnier for you time

As some of you suggested I need to have different tomcat for different java
version....


Do you mean if I have 2 webapps, which works on 2 difference java versions
then, do I have to create 2 tomcat folders ? like this

Not absolutely necessary, if Tomcat is able to run on both JREs that you are trying to use. For example, TC7 can run on both JRE6 and JRE7. So you just need to start separate instances of TC with the appropriate parameters to the correct JRE.

However, it may be easier to manage if you have separate installations of TC for the different JRE versions.



/tomcat7_copy1 --->www.host1.com
    bin

       setenv.sh ----> java version1 for app1
       start.sh
       stop.sh

    conf
    logs
    server
    webapps ---> app1
    work

/tomcat8_copy2  --->www.host2.com
    bin

       setenv.sh ----> java version2 for app2
       start.sh
       stop.sh
    conf
    logs
    server
    webapps ---> app2
    work


if this is what you said, I suspect tomcat will get confused I think,
please guide me how can create 2 hosts ?

for instance I want to do like this, port should be 80

Each instance of Tomcat needs to listen on a unique combination of IP address:port. So you can't have both TC instances listening on a.b.c.d:port1; the second one will fail to start in this case. One of them will need to listen on e.f.g.h:port1, or on a.b.c.d:port2.




tomcat7_copy1 as www.host1.com
tomcat8_copy2 as www.host2.com

what will be the configuration, I suspect system will be confused with 2
versions of java, may be PID configuration is needed to solve conflict, but
I have no much idea about this tomcat and java.

what will be server.xml ?
what will be setenv.sh  ?

what I expect from you people is if I type *www.host1.com
<http://www.host1.com>* on browser I should get *tomcat7  default index
page*, and for *www.host2.com <http://www.host2.com>* I should get *tomcat8
default index page*, both should work simultaneously without any
disturbance like, suppose if I run stop.sh of tomcat7, it should not
disturb tomcat8.

Hope my requirement is clear to all of you.

Your requirements are clear enough (except for the listening address:port), but you have a fair amount of work ahead of you to get it to do what you want.




Please help me.


Thanks in advance.

- Peter














On Thu, Dec 26, 2013 at 2:42 PM, Mark Thomas <ma...@apache.org> wrote:

On 26/12/2013 04:30, Peter wrote:
Hi all, I am having strange issues with tomcat 7 as well as tomcat 8,
following is details of that issue, please someone help me to configure
java for each webapps

You can't do that. You can only have one version of Java per OS process
/ Tomcat instance. If you want different Java versions for different web
applications you need to have separate Tomcat instances.

Marl



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to