Hmmm, try to read out all request parameters, request attributes, and session attributes in the start of the page.
Something like for ( Enumeration enum = request.getAttributeNames(); enum.hasMoreElements(); ) { Object key = enum.nextElement(); Object value = request.getAttribute( key ); System.out.println( key + " --> " + value ); } to find out more... Put that code in a utility method (maybe there is one in the struts library???) Thomas At 06:40 07.10.2002 -0700, Tuan H. Le wrote: >Hi, > >I tried request.getAttribute( "selTopNav" ) too, but it still returned a >null value. > >Thanks, >Tuan > >-----Original Message----- >From: Thomas Eichberger [mailto:[EMAIL PROTECTED]] >Sent: Monday, October 07, 2002 6:28 AM >To: Struts Users Mailing List >Cc: Struts Users Mailing List (E-mail) >Subject: Re: Passing a request parameter within Struts framework > > >request.getAttribute( "selTopNav" ) > >not request.getParameter( "selTopNav" ) > >!!! > > >At 05:00 07.10.2002 -0700, Tuan H. Le wrote: > >Hi, > > > >How do I pass a request attribute to another form? In my case, after a > >successful login, it would forward the user to > >the main form (MainMeu.jsp which has a frameset). In the main form, it has > >several tabs. By default, it displays the > >first tab. > > > >Currently, in the perform() method of LoginAction class, I have the > >following code > > > >//... > >request.setAttribute( "selTopNav", "1" ); > >return( mapping.findForward( target ) ); > > > > > >Here's the code for the MainMenu.jsp > > > > > ><%@ page language="java" %> > ><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > ><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > > > ><!-- frame --> > > > > > >And, in the Top.jsp, I have a test code to get a value of the request > >attribute, but it always returns a null value > > > >Top Nav: <%= request.getParameter( "selTopNav" ) %> > > > >Here's a partial of my struts-config.xml file > > > > <form-beans> > > <form-bean name="loginForm" > > type="com.phs.ezhr.presentation.form.LoginForm" /> > > <form-bean name="mainMenuForm" > > type="com.phs.ezhr.presentation.form.MainMenuForm" /> > > </form-beans> > > > > <global-forwards> > > <forward name="login" path="/Login.jsp"/> > > </global-forwards> > > > > <!-- Action Mapping Definitions --> > > <action-mappings> > > <!-- Process a user login --> > > <action path="/login" > > type="com.phs.ezhr.presentation.action.LoginAction" > > validate="true" > > input="/Login.jsp" > > name="loginForm" > > scope="session" > > > <forward name="success" > > path="/MainMenu.jsp" /> > > <forward name="failure" > > path="/Login.jsp" /> > > </action> > > <!-- Process a user logoff --> > > <action path="/logoff" > > type="com.phs.ezhr.presentation.action.LogoffAction"> > > <forward name="success" path="/login.jsp" /> > > </action> > > <action path="/top" > > type="com.phs.ezhr.presentation.action.MainMenuAction" > > validate="false" > > input="/Top.jsp" > > name="mainMenuForm" > > scope="request" > > > </action> > > </action-mappings> > > > > > >Do you know what I'm missing? > > > >Thanks, > >Tuan > > > > > > > >-- > >To unsubscribe, > e-mail: <mailto:[EMAIL PROTECTED]> > >For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>