You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by jingle <ji...@hotmail.com> on 2005/06/14 11:26:52 UTC
how to link my portlet to other .jsp files?
Hi!
I've got some knowledge of jetspeed and the psml files. and I've deploy a
sample portlet with J2.
but I got some problem with the links between the my portlet and other Jsp
pages. Now I do it like this: define the VIEW_JSP as a session veriable to be
a parameter of getRequestDispatcher() in the doView() method,as the following
String viewPage=(String)session.getAttribute(RESULT_JSP);
PortletRequestDispatcher rd = getPortletContext
().getRequestDispatcher(getJspFilePath(request,viewPage));
rd.include(request,response);
and give it different Values in the processAction() method like this.
if(request.getParameter(BACK) != null)
{
PortletSession session = request.getPortletSession();
session.setAttribute(RESULT_JSP,"IndexPortletView");
}
//back login
if(request.getParameter(BACK_LOGIN) != null)
{
PortletSession session = request.getPortletSession();
session.setAttribute(RESULT_JSP,"Login");
}
//goto login
if(request.getParameter(NEWID) != null)
{
PortletSession session = request.getPortletSession();
session.setAttribute(RESULT_JSP,"Login");
}
But this is not so convenient, and it seems to be an improper way,
Could anybody tell me some formal way or better way to do this?
Thanks a lot!!
Jingle
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org