tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat6 - Context - aliases
Date Thu, 05 Apr 2012 14:04:39 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Léa,

On 4/4/12 2:28 PM, Léa Massiot wrote:
> < Context path="/an_alias_1" docBase="/home/d1" crossContext="true"
> / >

Do you really need crossContext="true" here?

> - This Configuration Descriptor is automatically deployed once
> saved.
> 
> - I suppressed the Webapp "w"'s "WEB-INF\context.xml" I had
> created.
> 
> - I redeployed the Webapp "w".

This is the first time you mentioned webapp "w". Is that the "main"
webapp?

> => Now, when a user clicks on any link < a href="/an_alias_1/file_<
> i>.txt"> file_< i>.txt < /a> it is successfully retrieved.

Good.

> => What is still problematic to me, is that, when the user clicks
> on a link, the context or Webapp changes (from "w" to
> "an_alias_1").

Why is that a problem?

> The resources which are in "/home/d1" are available directly by
> typing the following URL in a browser: 
> http://<hostname>:8080/an_alias_1/file_< i>.txt and not
> compulsorily through the Webapp "w".

Isn't that what you wanted? Or, do you want everything to be exposed
through /w/an_alias_1?

If you want /w/an_alias_1, then re-name your context deployment
descriptor:

$ mv an_alias_1.xml w\#an_alias_1.xml

Honestly, though, I'm not sure it makes any difference: a URL is a
URL. Maybe you just want to make it "look" like the resource "belongs"
to the webapp.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk99pncACgkQ9CaO5/Lv0PB1fgCeJ+kv6Y/UH9NlG4gIJYK36juZ
gE8An3r6kqhEUXY8pCwvb0A9v4YEvItG
=trQU
-----END PGP SIGNATURE-----

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


Mime
View raw message