Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Need help with simple struts question

AQureshi

2007-01-26

Replies:

Jim John <jimjohnlists@(protected):

> I'm very new to struts and have a simple question
>
> I have a page called mailGroups.jsp which uses some
> beans. I forward to mailGroupsEdit.jsp so that I can
> use the data from the beans in mailGroups.jsp for
> editing. So how do I get this information from
> mailGroups to mailGroupsEdit? What do I need to do in
> struts-config.xml? Both pages have references to the
> beans, but the mailGroupsEdit page does not have any
> data. Thank you.
>

You didnt mention any Action classes in between so I assume you are using
Actions to forward from screen to the next.

If your data structures are pretty much common across the application, I
guess you can create the beans in session scope instead of request scope.
This way they can be accessed from all pages/actions. Otherwise use the
Action class to get the data for the beans, put them in the request object
and forward to the mailGroupsEdit JSP.

Not sure if it helps
©2008 junlu.com - Jax Systems, LLC, U.S.A.