Thanks. Here is the code: ------- public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
HttpSession session = request.getSession(); User user = (User) session.getAttribute(Constants.USER_KEY); SearchForm searchForm=(SearchForm) form; searchForm.setZipcode(user.getZipcode()); searchForm.setCity(user.getCity()); searchForm.setState(user.getState()); searchForm.setCountry(user.getCountry()); return (mapping.findForward("success")); } ---------- --- Bill Siggelkow <[EMAIL PROTECTED]> wrote: > Hmm .. please include the code from the > PopulateAction. > > t t wrote: > > Hi, all, > > First, happy holidays to you! > > I got a question. I have such action mapping: > > -------------------------------- > > <action path="/Populate" > > type="myClasses.PopulateAction" > > name="SearchForm" > > scope="request" > > validate="false"> > > <forward name="success" > path="/search.jsp"/> > > </action> > > ----------------------------- > > I want to populate "SearchForm" with some existed > values(stored in session) before showing > "search.jsp". This work is done in "execute" method > of "PopulateAction". > > It works well when I use the mapping code shown > above. But when I take out the line -- > scope="request", that is, I want this form bean to > be a session bean. Then the values were not set. > They are just the initial values of the form bean. > > It seems a new form bean object was created after > "execute" method of "PopulateAction". Or , "execute" > method of "PopulateAction" was not executed. > > Any idea anyone? > > > > Thanks in advance. > > > > > > > > > > --------------------------------- > > Do you Yahoo!? > > Jazz up your holiday email with celebrity > designs. Learn more. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]