tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Multi level webapp
Date Thu, 09 Sep 2010 10:38:43 GMT
On 09/09/2010 10:47, Oscar Segarra Rey wrote:
> Hi,
> 
> We have an application (Gabjur) composed for several modules (AD, AX, FD...) that should
be served throug:
> 
> http://localhost/Gabjur/AD
> http://localhost/Gabjur/AX
> http://localhost/Gabjur/FD...
> 
> 1.- I have created the context file Gabjur#AD.xml, Gabjur#AX.xml and so on...
> 2.- I have renamed the .war's to Gabjur#AD.war, Gabjur#FD.war
> 3.- System deploys perfectly the .war files.
> 
> The appears when application has to be started.  When application starts up it creates
automatically a file in the WEB-INF\classes folder called dfc.keystore but for any reason
it is nota ble to create it in a folder containing the # character and therefore application
does not start up.

Hmm. I wonder if there is a URL being constructed somewhere where the
'#' is not escaped.

Anyway, an app trying to create such a file is in breach of the Servlet
specifications. There is nothing to say that WARs have to be expanded or
even have to be served from a file system.

> Is there any workarround to create a multilevel  application ?

Sure.

You'll need to move your WARs outside of the host's appBase. It looks
like the app really needs exploded directories anyway, so...

Create a new directory *outside* of the Tomcat directory tree such as
/external-apps
Add
/external-apps/Gabjur_AD
/external-apps/Gabjur_AX
etc.

Expand your WARs into the appropriate directories.

Under $CATALINA_BASE/conf/Catalina/localhost you still have your xml files:
Gabjur#AD.xml
Gabjur#AX.xml
etc

To each of these, add a docBase attribute to the Context element that
points to the expanded directory. e.g for Gabjur#AD.xml

<Context docBase="/external-apps/Gabjur_AD" ... >
 ...
</Context>

HTH,

Mark

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


Mime
View raw message