I have a portlet that is derived from GenericPortlet. In the processAction class I have the following code:

plant = new Plant();
plant.setPlantName("My Plant");
request.getPortletSession ().setAttribute("plant", plant, PortletSession.PORTLET_SCOPE);


I also have a doView that simply returns the proper JSP file. I also put a log message in there to make sure that the attribute "plant" existed and it does.

In the JSP I have the following:

<[EMAIL PROTECTED] contentType="text/html"%>
<[EMAIL PROTECTED] pageEncoding="UTF-8"%>
<%@ page import="javax.portlet.* "%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core <http://java.sun.com/jsp/jstl/core>" prefix="c"%> <%@ taglib uri="http://java.sun.com/portlet <http://java.sun.com/portlet>" prefix="portlet"%>

<portlet:defineObjects />

<c:out value="plantName: ${plant.plantName}"/>

<form method="post" action="<portlet:actionURL/>" portletMode="view">
Plant Name: <input type="text" name="plantName" value="${plant.plantName}" />
   <input type="submit" name="savePlant" value="Save"/>
   <input type="submit" name="cancelEditPlant" value="Cancel"/>
</form>

The ${plant.plantName} does not work. But if I change my processAction method to put plant in APPLICATION_SCOPE, it works. Am I missing something here?

--
Thanks,
Michael Binette


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to