Hello, I am working on porting and existing struts 1.2.7 webapp to a
portlet. I have several actions that place attributes on the request
and then forward to the jsp.
I have set these attributes in struts-portlet-config.xml to be part of
the render-context.
<config>
<render-context>
<attribute name="errors"/>
<attribute name="message"/>
<attribute name="test"/>
<attribute name="sponsors"/>
</render-context>
...
I have debugged the processing, and once I reach the jsp, the attributes
have been preserved, but they are no longer members of the request.
Instead, there is an attribute on the request that looks like the entire
portlet request, and within this attribute are the actual attributes I
am looking for.
Any advice on why my attributes are being hidden, and what I can do to
get to them?
Thanks,
Brian Relph
Other configs:
<struts-config>
<form-beans>
<form-bean name="ManageUserForm"
type="com.cerner.healthe.mailmerge.ManageProvisionUserForm"/>
</form-beans>
<global-exceptions>
</global-exceptions>
<global-forwards>
</global-forwards>
<action-mappings>
<action path="/index" include="/index.jsp"/>
<action path="/help" include="/help.jsp"/>
<action path="/mailmerge" include="/pages/mailmerge/mailmerge.jsp"/>
<action path="/prepareMailmerge"
type="com.cerner.healthe.mailmerge.PrepareMailMerge"
name="ManageUserForm" scope="request">
<forward name="success" path="/mailmerge.do"
redirect="true" />
</action>
<action path="/manageUser"
type="com.cerner.healthe.mailmerge.ManageProvisionUserAction"
name="ManageUserForm" parameter="method" validate="true" scope="request"
input="/prepareMailMerge.do">
<forward name="success" path="/mailmerge.do"/>
</action>
</action-mappings>
<controller pagePattern="$M$P" inputForward="false"
processorClass="org.apache.portals.bridges.struts.PortletRequestProcesso
r"/>
<message-resources parameter="properties.cerner.i18n-resources"
factory="com.cerner.healthe.struts.util.ResourceAssistantMessageResource
sFactory"/>
<plug-in
className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/config/validator-rules.xml,/WEB-INF/config/validation.xm
l"/>
</plug-in>
</struts-config>
<portlet-app id="healthe-admin"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.x
sd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
<portlet id="HealtheAdmin">
<description>Healthe Admin Struts portlet</description>
<portlet-name>HealtheAdminPortlet</portlet-name>
<display-name>HealtheAdmin Portlet</display-name>
<portlet-class>org.apache.portals.bridges.struts.StrutsPortlet</portlet-
class>
<init-param>
<name>ServletContextProvider</name>
<value>com.cerner.hin.portlet.ServletContextProviderImpl</value>
</init-param>
<init-param>
<name>PortletScopeStrutsSession</name>
<value>true</value>
</init-param>
<init-param>
<name>ViewPage</name>
<value>/index.do</value>
</init-param>
<init-param>
<name>HelpPage</name>
<value>/help.do</value>
</init-param>
<expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
<portlet-mode>HELP</portlet-mode>
</supports>
<portlet-info>
<title>HealtheAdmin</title>
<keywords>Struts,healthe,admin,demo,bridge</keywords>
</portlet-info>
</portlet>
</portlet-app>
<web-app>
<display-name>healthe-admin</display-name>
<description>Healthe Admin</description>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.portals.bridges.struts.PortletServlet</servlet
-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>
Restrict access to JSP pages
</web-resource-name>
<url-pattern>*.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<description>
With no roles defined, no access
granted
</description>
</auth-constraint>
</security-constraint>
</web-app>
----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from
Cerner Corporation and are intended only for the addressee. The information
contained in this message is confidential and may constitute inside or
non-public information under international, federal, or state securities laws.
Unauthorized forwarding, printing, copying, distribution, or use of such
information is strictly prohibited and may be unlawful. If you are not the
addressee, please promptly delete this message and notify the sender of the
delivery error by e-mail or you may call Cerner's corporate offices in Kansas
City, Missouri, U.S.A at (+1) (816)221-1024.