I think there is a simpler solution. Firstly, have one web app. Secondly,
have a database (could even be an encyrpted text file) containing user
information.
When a user logs in. You check him against the database to confirm password
etc. You asertain from this which company he works for and you load those
properties. Each servlet's behaviour would depend on the company the user
works for. e.g.servlet A displays page bob.jsp for company bob, but fred.jsp
for company fred. The company properties would be stored in the session
info.
This relies on some decent authentication and session handling stuff, but
makes your life allot simpler. If you want more specific info on tailoring
the content for specific customers, let me know - its a subject close to my
heart (currently anyway!)
sam
----- Original Message -----
From: "Will England" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 24, 2001 4:42 PM
Subject: Multiple Unique Instances WITHOUT multiple JVM?
> Greetings!
>
> Here's what we want to do:
>
> We want to host our new servlet product as an ASP. Each customer of ours
> would get a unique configuration for the product. However, all of the
> servlets would run from one code base.
>
> We'd have the classes here:
>
> /webhome/classes/com/ourcompany/server/product
>
> and each customer would have their own WEB-INF:
>
> /webhome/customer1/WEB-INF/
>
> Each customers servlets would be mapped like this:
>
> /servlet/customer1/user
> /servlet/customer1/inventory
> /servlet/customer1/checkout
>
> And the second customer:
>
> /servlet/customer2/user
> /servlet/customer2/inventory
> /servlet/customer2/checkout
>
> user, inventory and checkout would all point to the same set of classes up
> in /webhome/classes.
>
> I know this is simple to do, if you are willing to spin up a new JVM for
> each customer / virtual host. However, with one box and 30 customers,
> that'd be right memory intensive.
>
> Questions:
>
> 1) Will this even work? Has anyone done this before?
>
> 2) How can we get different config files for each customer without
> explicitly referring to them as init-params in the web.xml file? (we need
> to be able to get the config from non-servlet aware classes).
>
> Thanks in advance for any tips; ask me if you need any clairification.
>
> Will
>
> --
> "If Al Gore invented the Internet, then I invented spellcheck!"
> Dan Quayle, quoted at the National Press Club, 8/3/1999
> [EMAIL PROTECTED]
> Recovery : http://will.mylanders.com/ PCS: 316-371-FOAD
>