tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Borut Hadžialić <borut.hadzia...@gmail.com>
Subject Re: Tomcat 5.5.30 and Spring Framework
Date Tue, 08 Mar 2011 08:47:01 GMT
The piece of xml you posted looks like something from
$TOMCAT_HOME/conf/web.xml file. This file contains some default
configuration that is applied to all web applications and you usually
don't change it.

What you need to find is the /WEB-INF directory of your web
application. /WEB-INF directory resides in the root directory of your
web application. This directory is also called Context Root / Document
Base - its the directory that contains all files of your app. You
usually put spring config files in the /WEB-INF directory of your web
application.


It doesn't matter where individual applications are on the disk (where
their Context Root / Document Base directories are). Applications can
be in $TOMCAT_HOME/webapps, or in some other directories anywhere on
the filesystem.

To figure out where your application's Context Root / Document Base is
you can do this:
1. use find to search for WEB-INF directories on your filesystem
2. find your Tomcat's instance conf directory ($TOMCAT_HOME/conf) and
go trough the config files there: first look at server.xml - look for
<Host> elements and see if it has a appBase attribute defined. Then
check if the <Host> element has any <Context> child elements. If it
does, their docBase attribute points to document base of an
application.
If you don't find it there, look for subdirectories in conf directory
- for example there might be subdirectories Catalina/localhost that
contain individual application xml config files. Those files also
contain <Context> elements - look for their docBase attribute.

On Tue, Mar 8, 2011 at 4:47 AM, Aureliusz R. <arempala@gmail.com> wrote:
> I know this is not a typical tomcat question but please bear with me.
> All Spring integrations call for placing configuration xmls in
> /WEB-INF/ of an application. The tomcat that I'm forced to work with
> has a weird configuration where there are no applications under
> $TOMCAT_HOME/webapps folder. There is one folder where all of the
> servlets go, and the invoker servlet is mapped to it:
>
> <servlet-mapping>
>  <servlet-name>invoker</servlet-name>
>  <url-pattern>/servlets/*</url-pattern>
> </servlet-mapping>
>
> My question is, how do I know where the context (default context?) in
> such a situation is, so that I could place my spring configuration
> files in there? Is spring usage even possible with such configuration?
>
> Thanks
> Aurir_
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>



-- 
Why?
Because YES!

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


Mime
View raw message