You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Herve <he...@ifrance.com> on 2002/08/09 10:48:13 UTC

HREF and Propfind

Hello,

when I do a propfind on a file, HREF contain a relative URI. Is it normal ? I was expected an absolute URI.

( I'm currently using a nightly build from August 7th deployed as a war file in Tomcat 4.1.7).

Thanks for your help.

Herve

Re: HREF and Propfind

Posted by Herve <he...@ifrance.com>.
Hi,

So, this is what I get:
<D:multistatus xmlns:D="DAV:">
    <D:response>
        <D:href>/slide/files/toto/folders</D:href>
        <D:propstat>
            <D:prop>
                <D:displayname>folders</D:displayname>
...

and I would have expect
<D:href>http://localhost:8080/slide/files/toto/folders</D:href>

In order to correct this, I tried to make a modification in
getPropertiesOfObject of the PropFindMethod class.
I modified
hrefElement.setText(
                    WebdavUtils.getAbsolutePath(object.getUri(), req,
                                                getConfig()));

with
                hrefElement.setText(serverURL +
                    WebdavUtils.getAbsolutePath(object.getUri(), req,
                                                getConfig()));

It's now working except for the port number:
String serverURL = HTTP_PROTOCOL + req.getServerName()+ ":" +
req.getServerPort();

and req.getServerPort() return the default http port 80 and not the used
port 8080.

As serverURL is already used somewhere else, this may also generate errors
somewhere else.
Does somebody know why req.getServerPort() doesn't work ?

Thanks for your help.

Herve




----- Original Message -----
From: "A Felix" <te...@yahoo.com>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, August 09, 2002 5:19 PM
Subject: Re: HREF and Propfind


> Hi,
>
>  I don't know why you are getting relative value  :((
> But whatever you are expecting that is correct :p
> It must return absolute URI only.
>
>  -af
>
> --- Herve <he...@ifrance.com> wrote:
> >
> > Hello,
> >
> > when I do a propfind on a file, HREF contain a
> > relative URI. Is it normal ? I was expected an
> > absolute URI.
> >
> > ( I'm currently using a nightly build from August
> > 7th deployed as a war file in Tomcat 4.1.7).
> >
> > Thanks for your help.
> >
> > Herve
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


______________________________________________________________________________
Pour mieux recevoir vos emails, utilisez un PC plus performant !
Découvrez la nouvelle gamme DELL en exclusivité sur i (france)
http://www.ifrance.com/_reloc/signedell


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: HREF and Propfind

Posted by A Felix <te...@yahoo.com>.
Hi, 

 I don't know why you are getting relative value  :((
But whatever you are expecting that is correct :p
It must return absolute URI only.

 -af

--- Herve <he...@ifrance.com> wrote:
> 
> Hello,
> 
> when I do a propfind on a file, HREF contain a
> relative URI. Is it normal ? I was expected an
> absolute URI.
> 
> ( I'm currently using a nightly build from August
> 7th deployed as a war file in Tomcat 4.1.7).
> 
> Thanks for your help.
> 
> Herve
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>