You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by James McCarthy <ja...@webxi.com> on 2000/02/29 00:07:45 UTC

Context Mapping Problems

I am trying to setup a new Context within my server but I am having some
difficulty understanding the configuration concepts within the server.xml
file.

It looks like almost every component of the server falls within the
<ContextManager> tag and the context manager seems to also declare a home
location which controls the mapping to the local directories for each
<Context>.

What I am trying to do is map a context location with an absolute path
rather than a path which is relative to the main server (a virtual directory
map). This seemed to work in previous releases but in the latest release
results in an error. The context entry that I am using declares an absolute
path rather than a path relative to the server.

<Context path="/symmetry" docBase="/Inetpub/wwwroot/symmetry" debug="0"
reloadable="true" >
</Context>

But when the server starts it seems to always try to locate the context
relative to the server home location.

Is this expected behavior or is this a bug?

Does anyone else have application contexts that are not relative to the
servers home directory?

Also, I would like to request a better way to declare classpath entries. I
don't see anyway of declaring a classpath other than thru an environment
variable or modifying the startup scripts?

Thanks,

Jim McCarthy
jamesm@webxi.com


Re: Context Mapping Problems

Posted by Manik Surtani <ma...@espadanet.com>.
Hi, James.

Yes, I have witnessed the same problem with 3.1M2RC2.

As a quick & dirty solution, I have made a symlink to the relevant directory.

E.g.,

Instead of doing
<Context path="/infomutual" docBase="/home/httpd/html/infomutual" debug="0"
reloadable="true" >
</Context>

I did a

ln -s /home/httpd/html/infomutual infomutual

in the (existing) ROOT context.

I know this is not the best way to do things, but it works for now .... !

Also, I notice (from your /Inetpub/wwwroot/ directories) that you are running
this on windows.  I am not sure how it will behave with windows shortcuts rather
than Unix symlinks, but it's worth a try.

Cheers,

Manik

James McCarthy wrote:

> I am trying to setup a new Context within my server but I am having some
> difficulty understanding the configuration concepts within the server.xml
> file.
>
> It looks like almost every component of the server falls within the
> <ContextManager> tag and the context manager seems to also declare a home
> location which controls the mapping to the local directories for each
> <Context>.
>
> What I am trying to do is map a context location with an absolute path
> rather than a path which is relative to the main server (a virtual directory
> map). This seemed to work in previous releases but in the latest release
> results in an error. The context entry that I am using declares an absolute
> path rather than a path relative to the server.
>
> <Context path="/symmetry" docBase="/Inetpub/wwwroot/symmetry" debug="0"
> reloadable="true" >
> </Context>
>
> But when the server starts it seems to always try to locate the context
> relative to the server home location.
>
> Is this expected behavior or is this a bug?
>
> Does anyone else have application contexts that are not relative to the
> servers home directory?
>
> Also, I would like to request a better way to declare classpath entries. I
> don't see anyway of declaring a classpath other than thru an environment
> variable or modifying the startup scripts?
>
> Thanks,
>
> Jim McCarthy
> jamesm@webxi.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org

--
Manik Surtani
Chief Technology Officer
Espada (Pvt.) Ltd.
http://www.espadanet.com
ICQ: 853533