RE: Tiles scope problem
Richard Thanks for you reply. I don't set it to true as you can see below. This is part of my struts-config.xml action path=/providers/Eligibility type=org.bcbsri.thinui.struts.actions.EligibilityAction name=EligibilityForm scope=request input=/providers/eligibility/eligibilityLookup.jsp exception key=error.bcbsri.member.notfound type= org.bcbsri.common.exception.MemberNotFoundException path=/providers/eligibility/eligibilityLookup.jsp / exception key= error.bcbsri.provider.memberlookup.nocoveragefound type= org.bcbsri.common.exception.NoCoverageFoundException path=/providers/eligibility/eligibilityLookup.jsp / exception key=error.bcbsri.date.invalid type= org.bcbsri.common.exception.InvalidDateFormatException path=/providers/eligibility/eligibilityLookup.jsp / forward name=lookup path= /providers/eligibility/eligibilityLookup.jsp/ forward name=display path=bcbsri.layout/ If you look at the last line, thats where I call my bcbsri.layout tile. Richard Hightower To: Struts Users Mailing List [EMAIL PROTECTED] [EMAIL PROTECTED] ind.com cc: Subject: RE: Tiles scope problem 01/14/2004 11:05 PM Please respond to Struts Users Mailing List Check your action forward and make sure you don't have redirect=true. Rick Hightower Developer Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm Struts/J2EE consulting -- http://www.arc-mind.com/consulting.htm#StrutsMentoring -Original Message- From: Yogi_Shridhare/[EMAIL PROTECTED] [mailto:Yogi_Shridhare/[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 1:58 PM To: [EMAIL PROTECTED] Subject: Tiles scope problem Hi group I have a quick question for you. I really appreciate your time on this. We are trying to migrate our existing static JSP project to using Tiles. The question is this. I have a Struts action class calling a forward to one of the JSPs. This JSP does the Tiles insert for the body attribute. The body jsp iterates through the collection and tries to retrieve the properties of the collection. When I do this with Session scope, it works fine but with request scope it fails. Is there any way to make this work with request scope? Thanks. Following is the simple set up. file bcbsriLayout.jsp %@ page language=java % ... tiles:insert attribute=header / tiles:insert attribute=topnav/ tiles:insert attribute=leftnav/ ... tiles:insert attribute=body/ tiles:insert attribute=bottomnav/ File: eligibility.jsp (This jsp gets called from Struts action) %@ page language=java% %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % % session.setAttribute(navCode,GN2.02.01); % tiles:insert definition=bcbsri.layout tiles.put name=titleKey value=title / tiles:put name=body value=/eligibility.jsp / // the main JSP calling the logic:iterate /tiles:insert ../eligibility.jsp logic:iterate scope=request name=members id=member html:text size=30 readonly=true style=border:1 name=member property=formattedFullNameByFirst/ ... Access member properties // *Error member not defined /logic:iterate File:testTile.xml !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration//EN http://jakarta.apache.org/struts/dtds/tiles-config.dtd; !--%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %-- tiles-definitions definition name=bcbsri.layout page=/bcbsriLayout.jsp put name=titleKey type=string / put name=header value=/HeaderIncDyn.jsp / put name=topnav value=/TopNavIncDyn.jsp / put name=leftnav value=/LeftNavIncDyn.jsp / put name=body type=page / put name=bottomnav value
Tiles scope problem
Hi group I have a quick question for you. I really appreciate your time on this. We are trying to migrate our existing static JSP project to using Tiles. The question is this. I have a Struts action class calling a forward to one of the JSPs. This JSP does the Tiles insert for the body attribute. The body jsp iterates through the collection and tries to retrieve the properties of the collection. When I do this with Session scope, it works fine but with request scope it fails. Is there any way to make this work with request scope? Thanks. Following is the simple set up. file bcbsriLayout.jsp %@ page language=java % ... tiles:insert attribute=header / tiles:insert attribute=topnav/ tiles:insert attribute=leftnav/ ... tiles:insert attribute=body/ tiles:insert attribute=bottomnav/ File: eligibility.jsp (This jsp gets called from Struts action) %@ page language=java% %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % % session.setAttribute(navCode,GN2.02.01); % tiles:insert definition=bcbsri.layout tiles.put name=titleKey value=title / tiles:put name=body value=/eligibility.jsp / // the main JSP calling the logic:iterate /tiles:insert ../eligibility.jsp logic:iterate scope=request name=members id=member html:text size=30 readonly=true style=border:1 name=member property=formattedFullNameByFirst/ ... Access member properties // *Error member not defined /logic:iterate File:testTile.xml !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration//EN http://jakarta.apache.org/struts/dtds/tiles-config.dtd; !--%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %-- tiles-definitions definition name=bcbsri.layout page=/bcbsriLayout.jsp put name=titleKey type=string / put name=header value=/HeaderIncDyn.jsp / put name=topnav value=/TopNavIncDyn.jsp / put name=leftnav value=/LeftNavIncDyn.jsp / put name=body type=page / put name=bottomnav value=BottomNavIncDyn.jsp / /definition definition name=basic.tiles page=/definitions.jsp put name=title value=Basic title/ put name=header value=test1 / put name=footer value=test2 / put name=menu value=test33 / put name=body value=test4 / /definition /tiles-definitions The members collection gets populated by an Action class. If I change the above scope to session and change my action class accordingly, this works. But I would like to get it working with scope as request. can you suggest a solution? Thanks a lot. Yogi We are running into a following problem. ** MAILSWEEPER This e-mail and any files transmitted with are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the information contained in this e-mail is prohibited. If you have received this e-mail in error, please immediately notify your e-mail administrator. Blue Cross Blue Shield of Rhode Island in state: 401.751.1673 out of state: 1.800.343.5743 ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles scope problem
Check your action forward and make sure you don't have redirect=true. Rick Hightower Developer Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm Struts/J2EE consulting -- http://www.arc-mind.com/consulting.htm#StrutsMentoring -Original Message- From: Yogi_Shridhare/[EMAIL PROTECTED] [mailto:Yogi_Shridhare/[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 1:58 PM To: [EMAIL PROTECTED] Subject: Tiles scope problem Hi group I have a quick question for you. I really appreciate your time on this. We are trying to migrate our existing static JSP project to using Tiles. The question is this. I have a Struts action class calling a forward to one of the JSPs. This JSP does the Tiles insert for the body attribute. The body jsp iterates through the collection and tries to retrieve the properties of the collection. When I do this with Session scope, it works fine but with request scope it fails. Is there any way to make this work with request scope? Thanks. Following is the simple set up. file bcbsriLayout.jsp %@ page language=java % ... tiles:insert attribute=header / tiles:insert attribute=topnav/ tiles:insert attribute=leftnav/ ... tiles:insert attribute=body/ tiles:insert attribute=bottomnav/ File: eligibility.jsp (This jsp gets called from Struts action) %@ page language=java% %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % % session.setAttribute(navCode,GN2.02.01); % tiles:insert definition=bcbsri.layout tiles.put name=titleKey value=title / tiles:put name=body value=/eligibility.jsp / // the main JSP calling the logic:iterate /tiles:insert ../eligibility.jsp logic:iterate scope=request name=members id=member html:text size=30 readonly=true style=border:1 name=member property=formattedFullNameByFirst/ ... Access member properties // *Error member not defined /logic:iterate File:testTile.xml !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration//EN http://jakarta.apache.org/struts/dtds/tiles-config.dtd; !--%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %-- tiles-definitions definition name=bcbsri.layout page=/bcbsriLayout.jsp put name=titleKey type=string / put name=header value=/HeaderIncDyn.jsp / put name=topnav value=/TopNavIncDyn.jsp / put name=leftnav value=/LeftNavIncDyn.jsp / put name=body type=page / put name=bottomnav value=BottomNavIncDyn.jsp / /definition definition name=basic.tiles page=/definitions.jsp put name=title value=Basic title/ put name=header value=test1 / put name=footer value=test2 / put name=menu value=test33 / put name=body value=test4 / /definition /tiles-definitions The members collection gets populated by an Action class. If I change the above scope to session and change my action class accordingly, this works. But I would like to get it working with scope as request. can you suggest a solution? Thanks a lot. Yogi We are running into a following problem. ** MAILSWEEPER This e-mail and any files transmitted with are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the information contained in this e-mail is prohibited. If you have received this e-mail in error, please immediately notify your e-mail administrator. Blue Cross Blue Shield of Rhode Island in state: 401.751.1673 out of state: 1.800.343.5743 ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]