Passing parameters to a Portlet from a Servlet - Websphere
This is a discussion on Passing parameters to a Portlet from a Servlet - Websphere ; "+targetURLStr);// we have a valid URL here
response.sendRedirect(targetURLStr);// my doubts are on
//this line because the request should not stay alive after redirecting , but
//what is the alternative way .... IF im right
}catch(Exception ex){
ex.printStackTrace();
request.getRequestDispatcher("/error.jsp").forward(request, response);
}
...
-
Passing parameters to a Portlet from a Servlet
"+targetURLStr);// we have a valid URL here
response.sendRedirect(targetURLStr);// my doubts are on
//this line because the request should not stay alive after redirecting , but
//what is the alternative way .... IF im right
}catch(Exception ex){
ex.printStackTrace();
request.getRequestDispatcher("/error.jsp").forward(request, response);
}
}
whats wrong?
Any help?
Thanx
-
Re: Passing parameters to a Portlet from a Servlet
is "TestParametersPortlet"
the name of the portlet on the page or just the name of the portlet as set through the admin?
the params will not be passed if the portlet window is not named correctly
IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
-
Re: Passing parameters to a Portlet from a Servlet
Pages).
By the way, the Portlet is JSR-168 if this make any difference
-
Re: Passing parameters to a Portlet from a Servlet
that way of naming the portlet will not work, you have to name the portlet window
please see this technote
http://www.ibm.com/support/docview.w...id=swg21220164
IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
-
Re: Passing parameters to a Portlet from a Servlet
Dear Jim
Thanks for your help and fast replies, because I really needed that.
It worked now.
But I didnt get it, why the xmlAccess for the Portlet? and why the provided name through Custom Unique Name didnt work with the Portlet, but it did work with the Page?
Can you explain?
Thank you anyway
-
Re: Passing parameters to a Portlet from a Servlet
the reason for this is that params are scoped to a portlet instance. And the way to scope them yourself is to target the portlet instance on the page. Or the specific Portlet window.
So when you export the portlet, give a unique name to the portlet window, you are then telling it specifically which portlet on the page to get the params. So if you had two of the same on the page you could conceivably have two separate links to the two separate portlets and neither would be able to see the params of the other
Jim
IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
-
Re: Passing parameters to a Portlet from a Servlet
Thanks Jim
What a fast follow up you do!
Iam impressed 
Its nice to deal with you