[jboss-user] [JBoss Portal] - losing request attributes on struts bridge

habicht do-not-reply at jboss.com
Wed Jul 9 01:48:19 EDT 2008


hi,

i wrote a portlet-struts application on jboss-portal 2.6 about 6 months ago (a phone book). now i try to add some new features (without yet changing the configs) and face the following problem. on the first page (/index) i use the action-class to pass two array-lists to the jsp (building_list and org_list). when a search is started i search a database for the given parameters and return another array-list (ausgabe) to the action class. there i use request.setAttribute(...) to pass it on to the second page (/input). my problem is that the first two array-lists are really passed on from the action-class but the third one isn't. the funny thing is that 6 months ago all three array-lists were passed on correctly.

struts-config.xml
<struts-config>
  | 	<form-beans>
  | 		<form-bean name="TelefonbuchForm" type="at.ooegkk.intranet.telefonbuch.forms.TelefonbuchForm"/>
  | 	</form-beans>
  | 	<action-mappings>
  | 		<action
  | 			path="/index"
  | 			type="at.ooegkk.intranet.telefonbuch.action.TelefonbuchAction"
  | 			scope="request"
  | 			parameter="method">
  | 				<forward name="input" path="/input.do"/>
  | 			</action>
  | 			<action
  | 			path="/input" type="at.ooegkk.intranet.telefonbuch.action.TelefonbuchAction"
  | 			scope="request"
  | 			name="TelefonbuchForm"
  | 			validate="true"
  | 			input="/jsp/input.jsp"
  | 			parameter="method">
  | 				<forward name="input" path="/jsp/input.jsp"/>
  | 				<forward name="success" path="/jsp/ergebnis.jsp"/>
  | 				<forward name="successb" path="/jsp/ergebnis.jsp"/>
  | 				<forward name="detail" path="/jsp/ergebnis_detail.jsp"/>
  | 			</action>
  | 	</action-mappings>
  | 	<controller pagePattern="$M$P" inputForward="false" processorClass="org.apache.portals.bridges.struts.PortletRequestProcessor"/>
  | 	<message-resources parameter="ApplicationResources" />
  | 
  | 	<!-- ========== Plug Ins Configuration ================================== -->
  | 	<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
  | 		<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
  | 	</plug-in>
  | </struts-config>

struts-portlet-config.xml
<config>
  | 	<portlet-url-type default="action"/>
  | 	<render-context>
  | 		<attribute name="anz_page"/>
  | 		<attribute name="anz_result"/>
  | 		<attribute name="anz_suche"/>
  | 		<attribute name="at_beginning"/>
  | 		<attribute name="at_end"/>
  | 		<attribute name="ausgabe" keep="true"/>
  | 		<attribute name="building_list"/>
  | 		<attribute name="cur_page"/>
  | 		<attribute name="from_it"/>
  | 		<attribute name="gothere"/>
  | 		<attribute name="name_error"/>
  | 		<attribute name="org_list"/>
  | 		<attribute name="persDetail"/>
  | 		<attribute name="suchdaten"/>
  | 		<attribute name="taetigkeit_error"/>
  | 		<attribute name="TelefonbuchForm"/>
  | 		<attribute name="to_it"/>
  | 	</render-context>
  | </config>

portlet.xml
<portlet-app id="TelefonbuchPortlet" version="1.0">
  |   <portlet id="telefonbuch-portlet">
  |     <init-param>
  |       <name>ServletContextProvider</name>
  | 	  <value>org.jboss.portal.portlet.bridge.JBossServletContextProvider</value>      
  |     </init-param>
  |     <init-param>
  |       <name>ViewPage</name>
  |       <value>/index.do</value>
  |     </init-param>
  |     <portlet-name>telefonbuch-portlet</portlet-name>
  |     <display-name>Telefonbuch Portlet</display-name>
  |     <description>Das Telefonbuch Portlet</description>
  |     <portlet-class>org.apache.portals.bridges.struts.StrutsPortlet</portlet-class>
  |     <expiration-cache>0</expiration-cache>
  |     <supports>
  |       <mime-type>text/html</mime-type>
  |       <portlet-mode>VIEW</portlet-mode>
  |     </supports>
  |     <portlet-info>
  |       <short-title>Telefonbuch</short-title>
  |       <keywords>Telefonbuch</keywords>
  |     </portlet-info>
  |   </portlet>
  | </portlet-app>

technical:
Win XP Pro SP2
JDK 1.6.0_10
JBoss Portal 2.6.4 Bundle
Struts 1.2.7
Struts-Bridge 1.0.1
Hibernate 3.2

would be glad if someone could help me with this.
regards
Christof

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163188



More information about the jboss-user mailing list