> -----Message d'origine-----
> De: Anders Lindh [mailto:[EMAIL PROTECTED]]
> Date: lundi 8 avril 2002 11:15
> �: [EMAIL PROTECTED]
> Objet: [JBoss-user] Virtual hosts and root contexts
> 
> 
> Hi,
> 
> I'm trying to get catalina and virtual hosts to work, and finally seem
> have succeeded. The only remaining problem is how to deploy different
> root applications for different virtual hosts. If I define
> <context-root></context-root> in jboss-web.xml, catalina deploys it as
> web10xx. If I set a / in content-root, the context is 
> accessible through
> http://localhost//index.xml, not http://localhost/index.xml. Is there
> any magic word that puts the context in the root? (ROOT didn't work).
> Also renaming files to ".war" is quite a hack, 
the orthodox method is to use a .ear with an application.xml
including a <context-root>/</context-root>

and normally catalina engine before 244 does not support virtual host...

>and not possible as I
> need to have many root contexts. 
> 
> I'm using Jboss_2_5_11 (fresh from the cvs). If anyone wants the conf
> files, mail me (virtual hosts aren't too documented).

my patch to support most configuration element of
server.xml in the jboss.jcml have been integrated into
jboss.2.4.5 (my patch works on 2.4.4)...

I did'nt know ther was a 2.5.x version...
you should check what are the differences...

with my patch you can declare virtual host,
and a virtualhost prefix...

by default the virtual host prefix is "/host="
so if you deploy a file named

/host=www.myhost.com.war

it is deployed under root context of virtualhost named "www.myhost.com"
(you have to declare such a virtualhost and aliases like in server.xml,
in an <attrib name=Config> in the jboss.jcml...)

if you deploy an ear with application.xml referencing an
<context-root>/name=www.myhost.com/foo</context-root>
then it is deployed under /foo in the www.myhost.com virtual host...

I'm afraid that our changes are differents and not very compatible...


note that it would not be so hard to modify my patch, or jboss2.4.5 so that
it allows an <Attribute name="RootAlias">ROOT</Attribute>
which transform any context deployment under /ROOT into /

look at the place in my code where I check for the virtualhostprefix
and after that check for the RootAlias

another idea would be to use the URL encoding with %XX signs
so that you can deploy file named %2F.war or foo%2Fbar%2Fbob.war
automagically under / or /foo/bar/bob...
the transform should only be done for .war deployement and not
for <context-root> in .ear...





_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to