6 Replies Latest reply on May 6, 2009 9:08 AM by dsfds dqsfds

    user role and several portals

    dsfds dqsfds Newbie

      hello all,

      i have a portlet with an url but when i click on the link nothing...

      i don't unerderstand where is the problem

      this is the code of my class :

      import java.io.IOException;
      import java.io.PrintWriter;
      import javax.portlet.GenericPortlet;
      import javax.portlet.PortletException;
      import javax.portlet.PortletRequestDispatcher;
      import javax.portlet.RenderRequest;
      import javax.portlet.RenderResponse;
      import javax.portlet.UnavailableException;
      public class SimplePortlet extends GenericPortlet {
       /* (non-Javadoc)
       * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
       protected void doView(RenderRequest request, RenderResponse response)
       throws PortletException, IOException, UnavailableException {
       PortletRequestDispatcher prd=getPortletContext().getRequestDispatcher("/WEB-INF/jsp/hello.jsp");
       prd.include(request, response);
       protected void doHelp(RenderRequest request, RenderResponse response)
       throws PortletException, IOException {
       // TODO Auto-generated method stub
       PrintWriter writer=response.getWriter();
       writer.write("this portlet displays hello world in a jsp ");

      this is the code of my jsp :

      <?xml version="1.0" encoding="ISO-8859-1" ?>
      <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
       <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
      Allons visiter une page :
      <a href=" www.google.fr">google</a>

      i can't go to google for example through my portlet