IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New How would you set up a java webhost?
I just got Tomcat installed at home, and it responds to a certain port. Tonight I want to set it up to respond to requests from various vhosts. I want to have different codebases for different vhosts. I want it to work like a webhost: each vhost has it's own java sandbox and can't access other vhost's code.

So far all the documentation I've seen describes setting up one CLASSPATH. Wouldn't I need a different CLASSPATH for each vhost? How would I set this up?
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New Re: How would you set up a java webhost?
I'm not a Tomcat expert, so take this with a grain of salt:

First, I would recommend putting Apache in front, as I believe that it has better support for virtual hosting. However, the issue remains on how to point Apache to Tomcat such that a different "web app" gets called.

J2EE separates web apps (servlets/JSPs) into separate contexts ([link|http://host/context1|http://host/context1] versus [link|http://host/context2|http://host/context2]). This separates their class loaders/classpaths (though the classpath your referring to is probably for the who app server, itself). You should be able to configure Apache to point a particular virtual host to a particular Tomcat context.

Note that this separates each web app's class loaders, but all of the apps are still running in the same JVM. Basically, this means that "hosting" lots of Java web apps (as in a hosting service) is a major pain (the J2EE spec doesn't really support that kind of concept, which is kind of dumb), since it's possible for one web app to bring down the entire app server. At least, that's my understanding.

Dan
New Okay, think I can do that, will try tonight, thanks
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
     How would you set up a java webhost? - (drewk) - (2)
         Re: How would you set up a java webhost? - (dshellman) - (1)
             Okay, think I can do that, will try tonight, thanks -NT - (drewk)

Powered by a Chair of Comparative Owl Entrails!
39 ms