cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: Dependency to JDK 1.3
Date Thu, 20 Dec 2001 10:32:35 GMT


> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com]
> Sent: Thursday, December 20, 2001 11:11 AM
> To: cocoon-dev@xml.apache.org
> Subject: Re: Dependency to JDK 1.3
>
>
>
>
> Carsten Ziegeler a écrit :
> >
> > Hi,
> >
> > the recent CVS has a dependency to JDK 1.3 in the class
> > SimpleLuceneXMLIndexerImpl.java.
> > It uses the getPath() method of the URL class which is not
> available in JDK
> > 1.2.
> >
> > Can we avoid this? You can have a look in the URLSource class which also
> > optionally
> > uses the getPath() method).
>
> The difference between getPath() and getFile() is that the query part of
> the URL is returned by getFile() but removed by getPath().
>
> A quick look at SimpleLuceneXMLIndexerImpl shows that getPath() is used
> to remove query parameters from the incoming URL before setting the
> single parameter "?cocoon-view=content".
>
> The question is : is it good to throw away any parameters from the
> initial URL ? Shouldn't them be kept and cocoon-view be _added_ instead
> of replacing them ?
>
So changing the following line from

      URL contentURL = new URL(url, url.getPath() + CONTENT_QUERY );
to
      String urlString = url.toExternalForm();
      urlString += (urlString.indexOf('?') == -1) ? '?' : '&' +
CONTENT_QUERY;
      URL contentURL = new URL(urlString);

with CONTENT_QUERY = "cocoon-view=content";

should fix this, right?

Could the author of this class please confirm this and perhaps change it
then?

Carsten

> > Or do we need to switch to JDK 1.3? Or can we make the
> compilation optional?
>
> -1 for switching to 1.3 : there are still a lot of J2EE servers living
> on customer sites that are running 1.2.2 :(
>
> Sylvain.
>
> --
> Sylvain Wallez
> Anyware Technologies - http://www.anyware-tech.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message