WebSphere Portal Server - Re: Navigating using hyperlinks inside a jsp/portlet?

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > June 2004 > Re: Navigating using hyperlinks inside a jsp/portlet?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Navigating using hyperlinks inside a jsp/portlet?
Damian Harvey

2004-06-22, 2:49 am

I've done this by adding the following to the JSP :

<A HREF="<portletAPI:createURI>
<portletAPI:URIParameter name="page" value="somewhere.jsp"/>
</portletAPI:createURI>">Take me somewhere</A>

and then in your Portlet Action class in doView() :

String page= (String)request.getParameter("page");
if(page!= null) {
getPortletConfig().getContext().include(page,request,response);
}

Probably not the most ideal solution but it worked for me.

Cheers,

Damian.


Paul Lee wrote:

> Hi,
> I've done a bit of experimenting and delving in the help files.
> I've found two suggested methods of being able to navigate from jsp
> to jsp within a portlet, but neither work - I don't get an error message
> or anything: the portlet remains the same.
>
> The first one is using:
>
> <a href='<%=portletResponse.enclodeURL("Link.jsp")%>'>Click here</a>
>
> and the second uses
>
> <a href="<portlet:encodeURI path='Link.jsp'/>">Click here</a>
>
> where Link.jsp is in the same directory in the WAR file as the original
> (calling) index.jsp file.
>
> Best wishes
>
> Paul

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com