You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2001/12/20 09:45:52 UTC

Dependency to JDK 1.3

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).

Or do we need to switch to JDK 1.3? Or can we make the compilation optional?

Carsten


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


RE: Dependency to JDK 1.3

Posted by Carsten Ziegeler <cz...@s-und-n.de>.

> -----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


Re: Dependency to JDK 1.3

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

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 ?

> 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


Re: Dependency to JDK 1.3

Posted by giacomo <gi...@apache.org>.
On Thu, 20 Dec 2001, Carsten Ziegeler wrote:

> 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).
>
> Or do we need to switch to JDK 1.3? Or can we make the compilation optional?

I'd like to stay 1.2 compatible another while. I think we should change
the class you mentioned.

Giacomo

>
> Carsten
>
>
> ---------------------------------------------------------------------
> 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