You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "LaCasse, John" <JL...@filenet.com> on 2005/02/02 00:51:57 UTC

response.createActionURL() doesn't return a fully qualified URL

When I call response.createActionURL() it isn't returning a fully
qualified URL; other jsr168 containers I've used specifically WebSphere
and Weblogic may or may not return fully qualified URL's. In WebSphere
you have to response.encodeURL() to get it; Weblogic does it by default
and pluto doesn't appear to do it at all. This makes it difficult to get
back to the portlet from outside the app which I need to do frequently.
One thing is for sure and that is that everybody seems to be doing their
own thing here and hence removing some of the benefit of having a
standard. Any thoughts or suggestions on this point?
 
Thanks,
Jpl

Re: response.createActionURL() doesn't return a fully qualified URL

Posted by Stefan Hepper <st...@apache.org>.
LaCasse, John wrote:

> When I call response.createActionURL() it isn’t returning a fully 
> qualified URL; other jsr168 containers I’ve used specifically 
> WebSphere and Weblogic may or may not return fully qualified URL’s. In 
> WebSphere you have to response.encodeURL() to get it; Weblogic does it 
> by default and pluto doesn’t appear to do it at all. This makes it 
> difficult to get back to the portlet from outside the app which I need 
> to do frequently. One thing is for sure and that is that everybody 
> seems to be doing their own thing here and hence removing some of the 
> benefit of having a standard. Any thoughts or suggestions on this point?
>
> Thanks,
>
> Jpl
>
The JSR 168 clearly states that the URL generated by PortletURL.toString 
may not be a valid URL. This is especially true when running as a WSRP 
producer where the URL will be a WSRP defined token that gets re-written 
by the WSRP producer. EncodeURL is meant for encoding resource URLs, not 
portlet URLs.

The JSR 168 spec does not define any means to address portlets directly, 
this is something that is vendor specific currently. This is also not an 
easy thing, as normally you would want to address a portal page with 
specific portlets on the page, right? Even if it is one portlet only you 
would need the combination of portlet Java instance + preference data, 
which is why you cannot simply map it to a URL for the java instance 
like in the servlet case. Inside portals this can be quite differently 
represented right now.

Some help may be coming from the web services world. Once WS-Resouces is 
further along, WSRP V 2.0 or 3.0 may include something like that.

So, sorry nothing as solution for today, besides vendor extensions.

Question to the Jetspeed-2 guys: is there a service in J2 that a outside 
component can use to create a link to specific portlets.

Stefan