0 Replies Latest reply on Oct 25, 2006 2:43 PM by David Hoffman

    How to access Portlet Information in Edit functionality

    David Hoffman Newbie

      I have a portlet that is EDITable. In my portlet class, I have the following

      protected void doEdit(RenderRequest request, RenderResponse response) throws IOException, PortletException {
       PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/edit.jsp");
       dispatcher.include(request, response);

      In my "/WEB-INF/jsp/edit.jsp" I have the following:

      <%@ page isELIgnored="false" %>
      <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
      String NUMBER_OF_STORIES = renderRequest.getPortletSession().getPortletContext().getInitParameter("number_of_stories");
       <form method="post" action="<portlet:actionURL></portlet:actionURL>">
       <input type="text" name="number" value="<%=NUMBER_OF_STORIES%>">

      and in my portlet.xml I have


      Inside the Portlet class itself, I am able to getInitParameter("number_of_stories") successfully, but in my edit.jsp all I ever get back is "null".

      How do I access the init-param values in my edit.jsp?