[jboss-user] [JBoss Portal] - user role and several portals
bilou690
do-not-reply at jboss.com
Tue May 5 09:47:58 EDT 2009
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)
| */
| @Override
| protected void doView(RenderRequest request, RenderResponse response)
| throws PortletException, IOException, UnavailableException {
| response.setContentType("text/html");
| PortletRequestDispatcher prd=getPortletContext().getRequestDispatcher("/WEB-INF/jsp/hello.jsp");
| prd.include(request, response);
| }
|
| @Override
| 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 ");
| writer.close();
| }
|
| }
|
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"
| pageEncoding="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">
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
| <title>Hello</title>
| </head>
| <body>
| Allons visiter une page :
| <a href=" www.google.fr">google</a>
| </body>
| </html>
|
i can't go to google for example through my portlet
thanks
bilou690
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228660#4228660
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228660
More information about the jboss-user
mailing list