You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by jacky <ja...@gmail.com> on 2007/04/27 10:11:48 UTC
param in request
hi,
I added a link in jsp
<a href="http://localhost:8080/pluto/portal/helloword?titleId=1600630">test
link </a>
but in portlet, the param titleId can't be retrieved by
request.getParamter("titleId"). result is null.
how can i get the param in portlet?
--
Best Regards.
jacky
Re: param in request
Posted by Brian Nielsen <br...@sweetxml.org>.
Hi jacky
I'm no expert but I think your making a plain GET param that the
Portal/Portlet Container in principle do not know what portlet it
belongs to. You should do something like:
<portlet:renderURL var="myViewUrlWithParam">
<portlet:param name="titleId" value="1600630" />
</portlet:renderURL>
and then
<a href="${myViewUrlWithParam}">Go get it</a>.
Have a look at how the portlet container inserts this in the URL.
Try and have a look at the specification it's not that hard a read. I
"PLT.7.1 PortletURL" it says:
<quote>
Because some portal/portlet-containers implementations may encode
internal state as part
of the URL query string, portlet developers should not code forms using
the HTTP GET
method.
</quote>
Thinking about it now I'll say that the point is that with portlets you
have to 'generate' urls (for view og action) which is very different
from normal webapps.
Brgds, Brian
> hi,
> I added a link in jsp
> <a
> href="http://localhost:8080/pluto/portal/helloword?titleId=1600630">test
> link </a>
>
> but in portlet, the param titleId can't be retrieved by
> request.getParamter("titleId"). result is null.
> how can i get the param in portlet?
>