-
1. Re: wsrp and remote resources
claprun Feb 28, 2007 1:19 PM (in response to karink)You need to use a code block for your HTML fragment so that we can see the HTML.
-
2. Re: wsrp and remote resources
karink Feb 28, 2007 1:23 PM (in response to karink)uups sorry
here it is<img src="/PortletTest/gif/agif.gif"/>
Regards Karin -
3. Re: wsrp and remote resources
claprun Feb 28, 2007 1:55 PM (in response to karink)How is the URL generated in the portlet? Is it hardcoded or generated from PortletURL? You should always use PortletURL to generate URLs targetting your portlet. If PortletURL is used, it should work properly over WSRP. If the URL is hardcoded, then it's no surprise that it doesn't work over WSRP and actually is really fragile for your portlet locally as well.
-
4. Re: wsrp and remote resources
karink Mar 1, 2007 2:33 AM (in response to karink)it is not hardcoded, but I do not use Portlet URL
I used:writer.println("<img src=\"" + response.encodeURL(request.getContextPath() + "/gif/agif.gif") + "\"/>");
I will try it with PortletURL
Regards
Karin -
5. Re: wsrp and remote resources
karink Mar 1, 2007 4:01 AM (in response to karink)Hi
coded it with PortletURLPortletURL url = response.createRenderURL(); writer.println("<img src=\"" + url.toString()+ "/gif/agif.gif" + "\"/>");
When invoking locally, following html code is generated:<img src="/portal/auth/portal/default/Unsere%20Seite/aaa?action=2/gif/agif.gif"/>
-> not what I expected and definitely wrong
When invoking remote, I got back an exceptionjava.lang.IllegalArgumentException: wsrp_rewrite?wsrp-urlType=render&wsrp-navigationalState=JBPNS_/wsrp_rewrite/gif/agif.gif does not end with /wsrp_rewrite at org.jboss.portal.wsrp.WSRPPortletURL.create(WSRPPortletURL.java:117)
Could you give me an sample code.
Regards Karin -
6. Re: wsrp and remote resources
karink Mar 2, 2007 10:29 AM (in response to karink)Hi
according to this documentation http://dev2dev.bea.com/pub/a/2006/12/writing-jsr-168-portlets.html
it is correct to use
PortletRequest.getContextPath and to use PortletResponse.encodeUrl to encode the URL
If there is another way (which works with WSRP) could you please send
me a code snippet.
Regards Karin -
7. Re: wsrp and remote resources
claprun Mar 4, 2007 12:10 AM (in response to karink)It should indeed be working. I will be looking at it ASAP.
-
8. Re: wsrp and remote resources
claprun Mar 5, 2007 12:49 AM (in response to karink)It indeed doesn't work as expected. :(
http://jira.jboss.com/jira/browse/JBPORTAL-1298 -
9. Re: wsrp and remote resources
claprun Mar 9, 2007 10:57 AM (in response to karink)Fixed in subversion. Thanks for reporting the issue.