Re: param in request

Brian Nielsen <[email protected]>
Newsgroups gmane.comp.jakarta.pluto.user
Message-ID <[email protected]>
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?
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.