-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tod,

On 9/18/2011 1:37 PM, Tod Olson wrote:
> I would like to run two versions of the same servlet (same 
> servlet-class, but with different WAR filename, servlet-name and 
> url-pattern) under a single instance of Tomcat 6.0.33.

Your nomenclature is wrong. From what you are saying, you want to
deploy the same webapp twice in the same container.

> Basically, the aim is to run both test and production versions of
> the servlet under the same instance.

Uh, I would highly recommend against that for two obvious reasons:
security and performance. Having said that...

> Better to run them under separate instances, but getting a
> suitable second instance is proving difficult.

Get an EC2 instance. They're cheap.

> I thought that the same servlet-class would be fine as long as the 
> servlet-name and url-pattern were different, but does not seem to
> be enough.

Don't try to mess around with web.xml: do this through webapp deployment.

Glad to see you got it working with Andre's help.

I would caution you about using nested context paths (i.e. /foo for a
production servlet URL and /test/foo for test) because you will get
overlapping JSESSIONID cookie paths (one for '/' and one for '/test').
This can cause all kinds of confusion, even if you are the only one
doing it (presumably customers aren't using 'test' on a regular basis).

There's another reason to deploy production to, say, '/prod': it will
force you to ensure that all your links are prefixed and encoded
properly. If you have one URL that is not properly prefixed, then
users of '/test' will suddenly end up in the production environment
(possibly unauthenticated) and confusion will ensue.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk53nSQACgkQ9CaO5/Lv0PA5mwCgm4pEEK7LdPZZzFXLeO6/m33j
w9AAmwSwrNVUkPXAiftKAOvX7N4DQQHB
=Ng81
-----END PGP SIGNATURE-----

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

Reply via email to