tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Tomcat6 - Context - aliases
Date Wed, 04 Apr 2012 20:47:07 GMT
2012/4/4 Léa Massiot <lmhelp1@orange.fr>:
> Ok. So, I found a solution, if I can call that a solution.
>
> - I created a file "an_alias_1.xml" in "/etc/tomcat6/Catalina/localhost/"
> (the OS being Debian Squeeze).
>
> - Here are the contents of this "an_alias_1.xml" file:
> < Context path="/an_alias_1" docBase="/home/d1" crossContext="true" / >

You should remove the path attribute when Context is defined in an XML file.

The name of the xml file itself specifies the path, not the attribute.

See "Context" chapter in configuration reference for details.

>
> - 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".
>
> => Now, when a user clicks on any link < a href="/an_alias_1/file_< i>.txt">
> file_< i>.txt < /a>
> it is successfully retrieved.
>
> => 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").
> 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".
>

Best regards.
Konstantin Kolinko

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


Mime
View raw message