Hi,

How can we forward to new page using a portlet. Is there anytihng called 
response.sendRedirect("url"); . If yes how to use it.

I tried using this code... but it is not working.



  | package org.jboss.portal.core.portlet;
  | 
  | import java.io.IOException;
  | import java.io.PrintWriter;
  | import javax.portlet.*;
  | public class YahooPortlet extends GenericPortlet
  | {
  | 
  |     public YahooPortlet()
  |     {
  |     }
  |     public void render(RenderRequest request, RenderResponse response)
  |         throws PortletException, PortletSecurityException, IOException 
  |     {
  |         if(!WindowState.MINIMIZED.equals(request.getWindowState()))
  |         {
  |             response.setTitle("Yahoo portlet");
  |             response.setContentType("text/html");
  |             PrintWriter writer = response.getWriter();
  |                     
  |             writer.print("<a href='http://www.yahoo.com'>yahoo</a>");
  |         }
  |     }
  |     public void processAction(ActionRequest request, ActionResponse 
response)
  |     throws UnavailableException, PortletSecurityException, 
PortletException, IOException
  |     {
  |         response.sendRedirect("http://mail.yahoo.com";);
  |     }
  | }
  | 

-----

It is displaying the link on the page but not forwarding to other page. 
Optionally can we do something like <jsp:include /> in jsp.

Thanks,

Rahul Gupta

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884589#3884589

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884589


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to