tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: AJP Todo
Date Tue, 11 Dec 2001 05:32:44 GMT

----- Original Message -----
From: "Craig R. McClanahan" <craigmcc@apache.org>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Monday, December 10, 2001 8:59 PM
Subject: Re: AJP Todo


>
>
> On Mon, 10 Dec 2001, Bill Barker wrote:
>
> > Date: Mon, 10 Dec 2001 20:00:35 -0800
> > From: Bill Barker <wbarker@wilshire.com>
> > Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> > To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> > Subject: Re: AJP Todo
> >
> >
> > ----- Original Message -----
> > From: "Incze Lajos" <incze@mail.matav.hu>
> > To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
> > Sent: Monday, December 10, 2001 8:02 AM
> > Subject: Re: AJP Todo
> >
> >
> > > What's wrong with this? (ServletContext method javadoc both 2.2 and
2.3)
> >
> > Absolutely nothing.  And indeed this is the route I took, since looking
at
> > the code showed that the Naming methods still didn't guarantee an
absolute
> > path and this one always returns null for non-file-based contexts.
> >
>
> That's because there *is* no such thing as an absolute path for an entry
> inside a WAR file.  Talk to your favorite OS vendor about that one.

Don't get so touchy :).  I'm certainly not going to criticize Tomcat 4.x
when I'm the first to admit that I don't know it very well.  I was actually
referring to FileDirContext.getNameInNamespace when I was talking about
non-absolute paths.  As it is now, ${Server}Config does a forwardAll if the
Context is defined by a WAR file.

>
> > Now if I can just find someone to Listen to, I'll be done :).
>
> What is it you think should be changed?

I don't know about "changed".  I'll simply describe the problem I'm facing.
A lot of users simply want to include one ApacheConfig statement in the
server.xml, include that file in the httpd.conf file and forget about it.
In order to get the configuration info, I need to Listen to somebody who
fires the START_EVENT at the end of Lifecycle.start (e.g. Container and
derived).  This leaves Host as the highest level I can Listen to.  However,
there are some one-time-only entries in the file that can't be repeated, so
Host doesn't work so well for simple configurations.  I'd really like Server
(since it is a singleton), but Server fires it's event at the beginning, so
the sub-elements aren't configured yet.  At the moment, I'm thinking that if
I'm Listening to a Server, I'll write the one-time-only information.  Then
you'll have to Listen to any Host or Context that you want configured as
well.
>
> Craig
>
>
> > > ----
> > > getRealPath
> > >
> > > public java.lang.String getRealPath(java.lang.String path)
> > >
> > > Returns a String containing the real path for a given virtual path.
> > > For example, the path "/index.html" returns the absolute file path
> > > on the server's filesystem would be served by a request for
> > > "http://host/contextPath/index.html", where contextPath is the context
> > > path of this ServletContext..
> > >
> > > The real path returned will be in a form appropriate to the computer
and
> > > operating system on which the servlet container is running, including
the
> > > proper path separators. This method returns null if the servlet
container
> > > cannot translate the virtual path to a real path for any reason (such
as
> > > when the content is being made available from a .war archive).
> > > -----
> > > So, getServletContext().getRealPath( "/" )
> > >
> > > incze
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:tomcat-dev-help@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message