Path annotation by pound sign?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Path annotation by pound sign?

Woonsan Ko-3
Hi,

org.hippoecm.hst.rest.SiteService.java has this:

    @Path("/#areAlive")
    @Produces(MediaType.TEXT_PLAIN)
    public boolean isAlive();

I don't think this is right. Even though the description of
javax.ws.rs.Path annotation doesn't describe it explicitly, I think it
should imply a *path* which should be part of URL in the following form [1]:

<scheme>://<authority><path>?<query>#<fragment>

The current usages mixing with a fragment is confusing. (how is it
different from '@Path("/%23areLive")'?)
It should have been something like '@Path("/_areLive")' instead.
Luckily CXF seems working now, but it seems wrong to me.

Regards,

Woonsan

[1] http://docs.oracle.com/javase/7/docs/api/java/net/URL.html

--
[hidden email]     www.onehippo.com
Boston - 101 Main Street, Cambridge, MA 02142
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Path annotation by pound sign?

Frank van Lankvelt
[ this mailing list is obsolete; use the google group hippo-community ]

You're right that the fragment is not part of the URL; so I agree that
a different path would have been better.
Let's do this in the 7.9; can you create JIRA issues (hst & cms)?

cheers, Frank


On Tue, Apr 9, 2013 at 9:36 PM, Woonsan Ko <[hidden email]> wrote:

> Hi,
>
> org.hippoecm.hst.rest.SiteService.java has this:
>
>     @Path("/#areAlive")
>     @Produces(MediaType.TEXT_PLAIN)
>     public boolean isAlive();
>
> I don't think this is right. Even though the description of
> javax.ws.rs.Path annotation doesn't describe it explicitly, I think it
> should imply a *path* which should be part of URL in the following form [1]:
>
> <scheme>://<authority><path>?<query>#<fragment>
>
> The current usages mixing with a fragment is confusing. (how is it
> different from '@Path("/%23areLive")'?)
> It should have been something like '@Path("/_areLive")' instead.
> Luckily CXF seems working now, but it seems wrong to me.
>
> Regards,
>
> Woonsan
>
> [1] http://docs.oracle.com/javase/7/docs/api/java/net/URL.html
>
> --
> [hidden email]     www.onehippo.com
> Boston - 101 Main Street, Cambridge, MA 02142
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Path annotation by pound sign?

Woonsan Ko-3
Oh, I didn't realize the mailing list I was using. :-)
Thanks Frank!
I'll create JIRA issues in HST and CMS.

Cheers,

Woonsan

On 4/10/13 3:47 AM, Frank van Lankvelt wrote:

> [ this mailing list is obsolete; use the google group hippo-community ]
>
> You're right that the fragment is not part of the URL; so I agree that
> a different path would have been better.
> Let's do this in the 7.9; can you create JIRA issues (hst & cms)?
>
> cheers, Frank
>
>
> On Tue, Apr 9, 2013 at 9:36 PM, Woonsan Ko <[hidden email]> wrote:
>> Hi,
>>
>> org.hippoecm.hst.rest.SiteService.java has this:
>>
>>     @Path("/#areAlive")
>>     @Produces(MediaType.TEXT_PLAIN)
>>     public boolean isAlive();
>>
>> I don't think this is right. Even though the description of
>> javax.ws.rs.Path annotation doesn't describe it explicitly, I think it
>> should imply a *path* which should be part of URL in the following form [1]:
>>
>> <scheme>://<authority><path>?<query>#<fragment>
>>
>> The current usages mixing with a fragment is confusing. (how is it
>> different from '@Path("/%23areLive")'?)
>> It should have been something like '@Path("/_areLive")' instead.
>> Luckily CXF seems working now, but it seems wrong to me.
>>
>> Regards,
>>
>> Woonsan
>>
>> [1] http://docs.oracle.com/javase/7/docs/api/java/net/URL.html
>>
>> --
>> [hidden email]     www.onehippo.com
>> Boston - 101 Main Street, Cambridge, MA 02142
>> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
>> US +1 877 414 4776 (toll free)
>> Europe +31(0)20 522 4466
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
> --
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
>


--
[hidden email]     www.onehippo.com
Boston - 101 Main Street, Cambridge, MA 02142
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html