This small patch allows one to deploy war files as the context root by
defining <context-root>ROOT</context-root> in jboss-web.xml. Quite
useful with virtual hosts...

The fix is quite obious, the current behavior only treated ROOT as a
special case if no context was given (webContext == null), which isn't
possible is you have a <context-root> element in jboss-web.xml. 

- Anders


Index: AbstractWebContainer.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/web/AbstractWebContainer.java,v
retrieving revision 1.4.4.10
diff -r1.4.4.10 AbstractWebContainer.java
573,575d572
<          // Special hanling for a war file named ROOT
<          if( webContext.equals("ROOT") )
<             webContext = "";
576a574,576
>       // Special hanling for a war file named ROOT
>       if( webContext.equals("ROOT") )
>           webContext = "";


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Anders
Lindh
Sent: 8. huhtikuuta 2002 11:15
To: [EMAIL PROTECTED]
Subject: [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, 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).

Thanks,

- Anders


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


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

Reply via email to