Yes! Thanks a lot,I read it and I forgot... However, now it can not retrieve the path to the style sheet, there is a tag to deal with that, I'm trying to find it....
-----Original Message----- From: Phil [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 3:01 PM To: Struts Users Mailing List Subject: Re: Request scope for FormBeans does not work?? Hi, i think you have to set the attribute redirect=false, than a simple forward is done. The difference between a redirect and a simple forward is that if you use redirect a new request is create when you call another resource (jsp or action). The default value of the attribute redirect is false, so you dont have to specify it. HTH, Phil ----- Original Message ----- From: "Voinea, Marina" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, November 13, 2003 8:42 PM Subject: Request scope for FormBeans does not work?? > Hi, > > Heeelp: > > I have been struggling for the last 2 days with an issue regarding the / > "request" / "session" scope of the form beans defined in action mappings. > (Request scope does not work for me, I have to use session scope...). Can > you please help : > > I have the following steps within the code; > - display login form (works OK) > - on submit, execute LoginAction (works OK) > - LoginAction returns "Admin" forward, and , as expected from the > configuration (attached below), the "prep_mtg_day" action is executed. > -PrepMtgDayAction action extracts the data from backend and stores the > result (a collection of beans) in the form as following: > > public class PrepMtgDayAction extends Action { > public ActionForward execute( ActionMapping mapping, > > ActionForm form, > > HttpServletRequest request, > > HttpServletResponse response) > throws Exception { > > (MtgDayForm)form.setMeetings(mtgBeanList); // try to > store in form, the form scoped at "request" > > or: > request.setAttribute("meetings", mtgBeanList); // try to store a > bean in the request sscope > } > > > After the action returns "success" and the page associated in the > mapping of the action is executed, the JSP tries to use "meetings" object > (Collection) from the form or request. > Only if the form scope is "session" or I set the attribute on the > session,(with session.setAttribute("meetings", mtgBeanList), > can I use it in the forwarded jsp... > > So, when does a "Request" start or end? It seems like during the forward > there is a new Request created?, so , whatever I stored within request gets > lost? > Any indications on when can I use Request scope? > > Thanks!!! > > > ====================Struts exception: ========================== > > <Nov 13, 2003 1:48:10 PM EST> <Error> <HTTP> <BEA-101017> > <[ServletContext(id=20 > 393935,name=CfgMgrWeb,context-path=/CfgMgrWeb)] Root cause of > ServletException. > javax.servlet.jsp.JspException: Cannot find bean meetings in any scope > at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938) > at > org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java: > 277) > > > > > > =====================struts config action mappings========================= > <action > path="/login" > type="com.genesys.cfgmgr.web.action.LoginAction" > scope="request" > name="loginForm" > validate="true" > input="/Login.jsp"> > <forward name="Admin" path="/action/prep_mtg_day" redirect="true"/> > This is what I use > <forward name="Unknown" path="/Login.jsp" redirect="true"/> > </action> > > <action > path="/prep_mtg_day" > type="com.genesys.cfgmgr.web.action.PrepMtgDayAction" > scope="request" > name="mtgDayForm"> > <forward name="success" path="/MeetingDay.jsp" redirect="true"/> > <forward name="error" path="/error.jsp" redirect="true"/> > </action> > > > > > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

