cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett McLaughlin <bmcla...@algx.net>
Subject Re: [Fwd: Examples and wrappers for Cocoon (from other applications)]
Date Thu, 23 Dec 1999 03:05:54 GMT


Stefano Mazzocchi wrote:
> 
> Brett McLaughlin wrote:
> 
> >                              Name: CocoonFromServlet.java
> >    CocoonFromServlet.java    Type: Java Source File (application/x-unknown-content-type-java_auto_file)
> >                          Encoding: base64
> >
> >                                 Name: CocoonServletRequest.java
> >    CocoonServletRequest.java    Type: Java Source File (application/x-unknown-content-type-java_auto_file)
> >                             Encoding: base64
> >
> >                                  Name: CocoonServletResponse.java
> >    CocoonServletResponse.java    Type: Java Source File (application/x-unknown-content-type-java_auto_file)
> >                              Encoding: base64
> 
> I know you'll hate me, but instead of
> 
>     public String getRemoteHost() {
>         if (req != null)
>             return req.getRemoteHost();
>         return null;
>     }
> 
> is there any reason why you didn't use
> 
>     public String getRemoteHost() {
>         return (req != null) ? req.getRemoteHost() : null;
>     }
> 
> which is much more readable and standard (IMO)?

I'm OK with that.  Do you want to commit them as is, then I'll cvs
update and then change/fix them?  That's easier for me... or you can
just give me write access and i'll do it myself ;-)

> 
> Besides this, I like them and I also like the approach, it's not that
> dirty as it seemed to me at first.

Good, when I did that, it felt cleaner.

> 
> I'm going to put them in the samples, any problem with that?

I think CocoonServletRequest and CocoonServletResponse should be part of
the distro, but CocoonFromServlet is in samples, yes.  The other two I
would prefer to be in the distro because then we don't get lots of "So I
wrote my own HttpServletRequest Implementation to use Cocoon, and it
doesn't work... here it is" when we already have a better one to tell
them to use.  Seems like it could solve some headaches...

-Brett

> 
> --
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <stefano@apache.org>                             Friedrich Nietzsche
> --------------------------------------------------------------------
>  Come to the first official Apache Software Foundation Conference!
> ------------------------- http://ApacheCon.Com ---------------------

Mime
View raw message