[OT?] Best way to test two Apache/Tomcat sites locally..

  • Thread starter Andrew Thompson
  • Start date
A

Andrew Thompson

What is the best way to install two tomcat sites
on the local drives for testing?

I am currently developing two separate java enabled
sites and want to have local servers for both.
Currently there is a Tomcat directory in my D: drive
which has the first site set up, ready for testing.

What is the easiest way to install the second
site so that I can test it as well?

Any links, search terms or advice appreciated.

[ My apologies if this is too far off-topic,
...could not think of a better place to ask ]
 
K

Kai Grossjohann

Andrew Thompson said:
I am currently developing two separate java enabled
sites and want to have local servers for both.
Currently there is a Tomcat directory in my D: drive
which has the first site set up, ready for testing.

What is the easiest way to install the second
site so that I can test it as well?

Install two copies of Apache and Tomcat or whatever, and tell them to
listen on different ports. http://localhost:8000/ could be the first
installation, and http://localhost:8001/ the second.

Is there a reason why this should fail?

Kai
 
A

Andrew Thompson

Kai Grossjohann said:
"Andrew Thompson" <[email protected]> writes:

Thanks for your response Kai
Install two copies of Apache and Tomcat or whatever, and tell them to
listen on different ports. http://localhost:8000/ could be the first
installation, and http://localhost:8001/ the second.

I have been given an answer from another source
that suggested I could configure Apache to look
in any number of paths for sites. Vis..

<Context
docBase="C:/development/myProject/ROOT"
path="/myproject"
reloadable="true" />

To be honest, I had not had time to try either way yet..
Is there a reason why this should fail?

Dunno, but I got the impression that configuring a
context path was more of a 'standard solution to
a common problem' so I might try that first..
 
K

Kai Grossjohann

Andrew Thompson said:
I have been given an answer from another source
that suggested I could configure Apache to look
in any number of paths for sites. Vis..

<Context
docBase="C:/development/myProject/ROOT"
path="/myproject"
reloadable="true" />

To be honest, I had not had time to try either way yet..

This looks like a piece of Tomcat configuration.

Yes, you can run multiple webapps on the same Tomcat installation.
They won't hurt each other. In fact, all you really need is two
directories under the webapps directory, eg. C:/Program Files/Apache
Group/Tomcat 4.1/webapps.

If you have two directories foo and bar there, then you'll have a
webapp where app URLs start with "/foo" and another where they start
with "/bar".

You can also tell a running Tomcat to use any directory as a webapp
(if it has the right structure). There are Ant tasks for this.

I was under the impression that you had to test different versions of
Tomcat or Apache with the different webapps. In that case, of course,
you need different installations...

Sorry for the misleading information.

Kai
 
A

Andrew Thompson

Kai Grossjohann said:
.....
Sorry for the misleading information.

You were helping me, and you apologise?
What for?!

As far as I am concerned, information from
usenet (or internet or ..just about anywhere)
is 'buyer beware'.

So _instead_ of forgiving you, I'll just say..
Thank you for your help. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top