Using a single webapp sounds like a nice idea, and hopefully feasible, I will
look into this more since I think that solution would be the most efficient.
However, the reason why this would be difficult is:

I am using Apache Wicket's WicketServlet, which is mapped to a single Wicket
Application class. The Application class initializes many in-memory
variables that depend on which database it is initialized with. Recall the
database loaded depends on the context name.

I could try to create multiple WicketServlets within a single web-app, but I
rather avoid hard-coding the "list of 200 sites" into the WAR. Ideally using
the 1 web-app method I'd like to create a filter that will make:

"/ctx1/wicket/homepage" construct the wicket application using a config file
called ctx1 and 
"/ctx2/wicket/homepage" construct the wicket application using a config file
called ctx2 (if it exists) etc...

That way I'd only have to add/remove config files that contain database
connection info to add/remove "sites".

I will try to see if I can bend the functionality of WicketServlet to do
this. I'm not sure I can easily. Thanks!



Alan Chaney wrote:
> 
> Wouldn't it be easier to have ONE webapp and determine the database 
> from, for example, the URL its invoked with?
> 
> Its a little difficult to know exactly how you are doing things but 
> instead of having /ctx1 /ctx2 /ctx3 and mapping each one to ctx1.war
> why not have a filter in your setup which determines that its invoked 
> with /ctx1 and passes a parameter to the actual servlet which selects 
> the database you require? You could have one web app as ROOT and do it
> that way.
> 
> Maybe you could explain further why you need 200 separate versions where 
> the only difference is the name of the database?
> 

-- 
View this message in context: 
http://www.nabble.com/Single-WAR-to-update-multiple-contexts-tp21338593p21353649.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to