0
votes

is there a way to access URL parameters in a Jetspeed2 Portlet/Portal?

like: www.bla.com/portal/page.psml?param=12345

I can only find some tools for liferay (PortalUtil.java) to access the httpservletrequest, but as far as i know there is no such thing for jetspeed?

I thought the public render parameters can be used for such thing, but i'm a little confused here? Didn't anyone had this problem before?

thanks in advance :)

2

2 Answers

0
votes

found the answer:


Until version 2.1, Jetspeed merged portal request parameters with portlet specific parameters, effectively allowing "shared" parameters. This is not compliant with the JSR-168 PLT.11, so by default this is now disabled.

By setting merge.portal.parameters.with.portlet.parameters=true this feature can be "restored". In the situation of portal and portlet parameters with the same name, by default the portlet parameters will be provided first in the values array, but this too can be overridden by setting merge.portal.parameters.before.portlet.parameters=true

Setting both these properties to true will deliver the "old" pre-2.1 behavior. Note: for individual portlets, these global settings can be overridden by setting these properties as metadata in jetspeed-portlet.xml

merge.portal.parameters.with.portlet.parameters=false merge.portal.parameters.before.portlet.parameters=false

To use public render parameters from the 2.0 spec

0
votes

Don't know if it works for jetspeed, but you can try getting the httprequest like this:

HttpServletRequest httpRequest = (HttpServletRequest) request.getAttribute("javax.servlet.request");

Then find the query string in a header like this:

String referer = httpRequest.getHeader("referer");

You'll then have the full page referer so you can parse the query string.