You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jon Scott Stevens <jo...@latchkey.com> on 2002/07/26 00:52:41 UTC
Re: cvs commit:
jakarta-turbine-2/src/java/org/apache/turbine/services/logging
TurbineLoggingService.java
on 7/25/02 10:20 AM, "henning@apache.org" <he...@apache.org> wrote:
> henning 2002/07/25 10:20:34
>
> Modified: src/java/org/apache/turbine Turbine.java
> src/java/org/apache/turbine/services/logging
> TurbineLoggingService.java
> Log:
> Changed getRealPath("") to getRealPath("/") to make some servlet
> containers happy, that choke on "". Suggested by Stephane Bailliez
> <st...@haht.com> after problems with iPlanet Application
> Server.
>
I'm strongly strongly strongly -1 on this. We should not be catering to
servlet containers who do not follow the specifications. If you want to see
this fixed, you should pressure the company that makes the container to fix
it.
This is what standards are for. If you don't follow them, then there is no
reason to have them.
Please back out this change immediately.
-jon
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit:
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Jason van Zyl <ja...@zenplex.com> writes:
>If this makes things work for all containers then it is a practical
>solution for the problem. Provided that this doesn't screw anyone else
>up. Henning, if you are sure this makes things work nicely for everyone
>then I support the change.
Well,
it seems to work on the ones that I tried (Tomcat and caucho) and
Stephane asked for it because of iPlanet; and if you ask me, if it
returns null, then "" and "." will return null, anyway. Simply because
"/" is always a legal webroot path to its root.
So I don't see any way of "breaking more" than before. If it returns null, then
we're out of luck anyway.
>What practical value is there in forcing this change to be backed out?
>It's not really helping anyone. And it certainly doesn't make Turbine
>look good in that we won't make exceptions for errant containers.
Completely +1 with you here.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit:
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Jason van Zyl <ja...@zenplex.com> writes:
>On Thu, 2002-07-25 at 19:18, Jon Scott Stevens wrote:
>> on 7/25/02 4:04 PM, "Jason van Zyl" <ja...@zenplex.com> wrote:
>>
>> > Jon, people don't have time to chase down vendors to fix things and even
>> > if they started the process it could take forever. If you are not
>> > prepared to personally help in the process of getting iPlanet to fix
>> > their implementation then the change should stay, again provide it works
>> > for everyone.
>>
>> About 3-4 months ago, when this issue first cropped up, I sent a message to
>> the JSR-154 (Servlet API) list detailing the problem.
>Yes, so what? Are you going to call the iPlanet crew and get them to fix
>it now. Don't punish our users because the people on the JSR didn't
>listen to you.
Fix WHAT? The behaviour is legal. Just different from Tomcat. Over and out.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit:
jakarta-turbine-2/src/java/org/apache/turbine/services/logging
TurbineLoggingService.java
Posted by Jason van Zyl <ja...@zenplex.com>.
On Thu, 2002-07-25 at 19:18, Jon Scott Stevens wrote:
> on 7/25/02 4:04 PM, "Jason van Zyl" <ja...@zenplex.com> wrote:
>
> > Jon, people don't have time to chase down vendors to fix things and even
> > if they started the process it could take forever. If you are not
> > prepared to personally help in the process of getting iPlanet to fix
> > their implementation then the change should stay, again provide it works
> > for everyone.
>
> About 3-4 months ago, when this issue first cropped up, I sent a message to
> the JSR-154 (Servlet API) list detailing the problem.
Yes, so what? Are you going to call the iPlanet crew and get them to fix
it now. Don't punish our users because the people on the JSR didn't
listen to you.
> > It's just plain silly to screw people not using an OSS
> > servlet containers where they don't have access to fix things easily.
> > Some people don't have a choice over what container they use and
> > obviously don't have the time to go tracking down developers for
> > iPlanet.
>
> Think of it this way...people choose commercial containers/software because
> they expect that they can get support from it and be able to call someone up
> who will fix problems when they come up. This is a perfect example of how
> broken that thinking is.
Yes, but Stephane probably had no choice in what container to use. He
would probably use Tomcat if he could but I guarantee you that he had no
choice in the matter. It's not his fault.
> So, if Turbine is doing the right thing and the servlet engine isn't, should
> we expect Turbine to always work around it?
Yes, absolutely. If it's required and a solution is provided that works
with all containers then I don't see any down side. It's not ideal but
that's reality. Why do we make exceptions in Torque for errant JDBC
drivers? Because Torque wouldn't work very well if it didn't handle
exceptional cases. That's life. I think handling errant container
behaviour falls into the same category. Strictly a pragmatic strategy
given the various users we have.
> I don't think so. Let these
> people who choose to use the broken containers (especially the commercial
> ones) call up their support and get them to fix it.
Yes, this is a very pragmatic for our users who have inordinate amounts
of free time.
> I'm still -1 on this.
If Henning verifies that the change doesn't affect any other users
adversely then you should retract your -1.
> -jon
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
jvz.
Jason van Zyl
jason@apache.org
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit:
jakarta-turbine-2/src/java/org/apache/turbine/services/logging
TurbineLoggingService.java
Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 7/25/02 4:04 PM, "Jason van Zyl" <ja...@zenplex.com> wrote:
> Jon, people don't have time to chase down vendors to fix things and even
> if they started the process it could take forever. If you are not
> prepared to personally help in the process of getting iPlanet to fix
> their implementation then the change should stay, again provide it works
> for everyone.
About 3-4 months ago, when this issue first cropped up, I sent a message to
the JSR-154 (Servlet API) list detailing the problem.
> It's just plain silly to screw people not using an OSS
> servlet containers where they don't have access to fix things easily.
> Some people don't have a choice over what container they use and
> obviously don't have the time to go tracking down developers for
> iPlanet.
Think of it this way...people choose commercial containers/software because
they expect that they can get support from it and be able to call someone up
who will fix problems when they come up. This is a perfect example of how
broken that thinking is.
So, if Turbine is doing the right thing and the servlet engine isn't, should
we expect Turbine to always work around it? I don't think so. Let these
people who choose to use the broken containers (especially the commercial
ones) call up their support and get them to fix it.
I'm still -1 on this.
-jon
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit:
jakarta-turbine-2/src/java/org/apache/turbine/services/logging
TurbineLoggingService.java
Posted by Jason van Zyl <ja...@zenplex.com>.
On Thu, 2002-07-25 at 18:52, Jon Scott Stevens wrote:
> on 7/25/02 10:20 AM, "henning@apache.org" <he...@apache.org> wrote:
>
> > henning 2002/07/25 10:20:34
> >
> > Modified: src/java/org/apache/turbine Turbine.java
> > src/java/org/apache/turbine/services/logging
> > TurbineLoggingService.java
> > Log:
> > Changed getRealPath("") to getRealPath("/") to make some servlet
> > containers happy, that choke on "". Suggested by Stephane Bailliez
> > <st...@haht.com> after problems with iPlanet Application
> > Server.
> >
>
> I'm strongly strongly strongly -1 on this. We should not be catering to
> servlet containers who do not follow the specifications. If you want to see
> this fixed, you should pressure the company that makes the container to fix
> it.
>
> This is what standards are for. If you don't follow them, then there is no
> reason to have them.
>
> Please back out this change immediately.
If this makes things work for all containers then it is a practical
solution for the problem. Provided that this doesn't screw anyone else
up. Henning, if you are sure this makes things work nicely for everyone
then I support the change.
Jon, people don't have time to chase down vendors to fix things and even
if they started the process it could take forever. If you are not
prepared to personally help in the process of getting iPlanet to fix
their implementation then the change should stay, again provide it works
for everyone. It's just plain silly to screw people not using an OSS
servlet containers where they don't have access to fix things easily.
Some people don't have a choice over what container they use and
obviously don't have the time to go tracking down developers for
iPlanet.
What practical value is there in forcing this change to be backed out?
It's not really helping anyone. And it certainly doesn't make Turbine
look good in that we won't make exceptions for errant containers.
> -jon
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
jvz.
Jason van Zyl
jason@apache.org
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/services/logging TurbineLoggingService.java
Posted by Daniel Rall <dl...@finemaltcoding.com>.
James Taylor <jt...@4lane.com> writes:
> As long as it does not cause a regression anywhere, I like this change.
> NOT because it makes us compatible with iPlanet (and the version of
> weblogic I used to use before resin =) but because the intent of the
> statement, get the real path for the ROOT (/) of the webapp. I think it
> makes the just _slightly_ more readable.
The intent of "/" is _much_ more clear than "", not _slightly_. :-)
--
Daniel Rall <dl...@finemaltcoding.com>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit:
jakarta-turbine-2/src/java/org/apache/turbine/services/logging
TurbineLoggingService.java
Posted by James Taylor <jt...@4lane.com>.
> > Changed getRealPath("") to getRealPath("/") to make some servlet
> > containers happy, that choke on "". Suggested by Stephane Bailliez
> > <st...@haht.com> after problems with iPlanet Application
> > Server.
> >
>
> I'm strongly strongly strongly -1 on this. We should not be catering to
> servlet containers who do not follow the specifications. If you want to see
> this fixed, you should pressure the company that makes the container to fix
> it.
As long as it does not cause a regression anywhere, I like this change.
NOT because it makes us compatible with iPlanet (and the version of
weblogic I used to use before resin =) but because the intent of the
statement, get the real path for the ROOT (/) of the webapp. I think it
makes the just _slightly_ more readable.
-- jt
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: cvs commit:
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Jon Scott Stevens <jo...@latchkey.com> writes:
>I'm strongly strongly strongly -1 on this. We should not be catering to
>servlet containers who do not follow the specifications. If you want to see
>this fixed, you should pressure the company that makes the container to fix
>it.
It is completely legal for a container to resolve getRealPath("") to
null and getRealPath("/") to the webapp root.
If you want the real path of the webapp root, then, IMHO, you must
translate "/". Translating "" (just like ".") is assuming that there
is some kind of implicit "working directory" that is set to the webapp
root.
I actually agree with iPlanet returning null on getRealPath("") while
resolving getRealPath("/"). The meaning of getRealPath("") is, just as
getRealPath(".") a grey area. How about getRealPath("..") ?
If you don't have a directory structure? If you're in a changeroot
where ".." == "." ?
>This is what standards are for. If you don't follow them, then there is no
>reason to have them.
I'm not in the business of forcing vendors to agree to my views. If
their implementation cannot translate "", this is legal. You might
want to actually _read_ the spec you're citing... Tomcat is a
_reference_ implementation of a spec. If it agrees to "", fine. It is,
however not something so be slavishly copied.
If you don't like iPlanet/Sun or anyone else, fine. But please keep
politics out of Apache projects.
>Please back out this change immediately.
Only if you can cite the section of the Servlet Spec where it is
required that getRealPath("") must translate to the path of a
webapplication and must not return null where "/" does not.
To help you out; in the current 2.3 Spec, there are two sections where
getRealPath is mentioned:
--- cut ---
SRV.4.5 Path Translation Methods There are two convenience methods in
the API which allow the Developer to obtain the file system path
equivalent to a particular path. These methods are:
* ServletContext.getRealPath
* HttpServletRequest.getPathTranslated
The getRealPath method takes a String argument and returns a String
representation of a file on the local file system to which a path
corresponds. The getPathTranslated method computes the real path of
the pathInfo of the request. In situations where the servlet container
cannot determine a valid file path for these methods, such as when the
web application is executed from an archive, on a remote file system
not accessible locally, or in a database, these methods must return
null.
--- cut ---
and
--- cut ---
getRealPath(String)
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).
Parameters: path - a String specifying a virtual path
Returns: a String specifying the real path, or null if the translation cannot be performed
--- cut ---
I can see no definition of getRealPath("") vs. getRealPath("/").
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>