Providing Technology Training and Mentoring For Modern Technology Adoption
Recently, I had to port a few portlets from WebSphere Portal 6.1 to WebLogic Portal 10g. Things mostly went smoothly. Except for portlet and resource URLs.
Weblogic portal adds URL parameters to portlet and resources URLs. For example:
These parameters caused unexpected problems.
For one thing, these URLs can not be used with a form that makes a GET request.
<form method="GET" action="<portlet:actionURL/>">
If you submit this form, the input elements will overwrite the URL parameters that are in the action URL. Things will work out badly from that point on.
Lesson learned, you can only make POST requests from a form.
By default, the <portlet:resourceURL> tag escapes XML in the URL. That means, all “&” parameter separators in the URL will be replaced by “&”. If you send a request to that URL, the serveResource() method will not be invoked. You must set escapeXml attribute to false. For example:
var url = "<portlet:resourceURL escapeXml="false"/>&searchText=" + txt;
None of these are issues in WebSphere Portal since the URLs do not contain any parameters.
Your email address will not be published. Required fields are marked *