Hello.

I'm trying to write a very simple portlet that uses an action URL and process a 
request in its processAction method.

The same portlet and JSP work perfectly in Jetspeed, but with JBoss portal, the 
processAction is never called.

An idea ? Something missing ?

The code of the portlet, jsp and descriptor are at the end of the message

Thanks

PORTLET

  | package my.portal.one.portlets;
  | 
  | import java.io.IOException;
  | 
  | import javax.portlet.ActionRequest;
  | import javax.portlet.ActionResponse;
  | import javax.portlet.PortletConfig;
  | import javax.portlet.PortletException;
  | import javax.portlet.RenderRequest;
  | import javax.portlet.RenderResponse;
  | 
  | import my.portal.one.tools.Tracer;
  | 
  | public class JspPortlet extends javax.portlet.GenericPortlet {
  | 
  |     private int count;
  | 
  |     @Override
  |     public void doView(final RenderRequest request, final RenderResponse 
response) throws PortletException, IOException {
  |             Tracer.trace(this, "Begin doView : " + 
request.getWindowState());
  |             response.setContentType("text/html");
  |             
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/page1-view.jsp").include(request,
 response);
  |             Tracer.trace(this, "End doView.");
  |     }
  | 
  |     @Override
  |     protected void doHelp(final RenderRequest request, final RenderResponse 
response) throws PortletException, IOException {
  |             Tracer.trace(this, "Begin doHelp...");
  |             response.setContentType("text/html");
  |             
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/page1-help.jsp").include(request,
 response);
  |             Tracer.trace(this, "End doHelp.");
  |     }
  | 
  |     @Override
  |     public void processAction(final ActionRequest request, final 
ActionResponse response) throws PortletException, IOException {
  |             Tracer.trace(this, "Begin processAction...");
  |             count++;
  |             response.setRenderParameter("count", Integer.toString(count));
  |             Tracer.trace(this, "End processAction. Count = " + count);
  |     }
  | 
  |     @Override
  |     public void init(final PortletConfig portletConfig) throws 
PortletException {
  |             Tracer.trace(this, "Begin init...");
  |             super.init(portletConfig);
  |             Tracer.trace(this, "End init.");
  |     }
  | 
  |     @Override
  |     public void destroy() {
  |             Tracer.trace(this, "Begin destroy...");
  |             super.destroy();
  |             Tracer.trace(this, "End destroy.");
  |     }
  | 
  | }
  | 

JSP

  | <[EMAIL PROTECTED] prefix="p" uri="http://java.sun.com/portlet"%>
  | <p:defineObjects/>
  | Voici la <b>vue</b> !
  | <br><br>
  | Portal Info :
  | <br><b>${renderRequest.portalContext.portalInfo}</b>
  | <br><br>
  | Namespace :
  | <br><b><p:namespace/></b>
  | <hr>
  | <div align="center">
  |     <form action="<p:actionURL/>">
  |             <%
  |             String count = renderRequest.getParameter("count");
  |             %>
  |             Count : <b><%=count%></b>
  |             <br>
  |             <input type="submit" value="Action !">
  |     </form>
  | </div>
  | 

portlet descriptor

  |     <portlet id="Felipe-1.E">
  | 
  |             <description>A portlet that uses JSP pages.</description>
  | 
  |             <portlet-name>Felipe-1#5</portlet-name>
  |             <display-name>Felipe JSP</display-name>
  | 
  |             <portlet-class>my.portal.one.portlets.JspPortlet</portlet-class>
  | 
  |             <supports>
  |                     <mime-type>text/html</mime-type>
  |                     <portlet-mode>HELP</portlet-mode>
  |             </supports>
  | 
  |             <portlet-info>
  |                     <title>Felipe-1 JSP</title>
  |                     <short-title>Portlet using JSP pages.</short-title>
  |                     <keywords>felipe,ephemeris,lappis,jsp</keywords>
  |             </portlet-info>
  | 
  |     </portlet>
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976024
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to