>>>>> "Howard" == Howard Miller <[EMAIL PROTECTED]> writes:

    Howard> Hi,
    Howard> Can somebody kindly help me with the following...

    Howard> I want to add a path and an Action class. The action class will then 
preload data into 
    Howard> a bean and then forward (do I mean forward) to the jsp that displays the 
bean. That's 
    Howard> it. I want this action to be in *addition* to the *normal* 
jsp/formbean/action setup.

    Howard> I can't see how to do it.... in particular

    Howard> 1. I don't think I fully understand how/why an action is associated with a 
bean in 
    Howard> struts-config. What does the action servlet do with this information.

    Howard> 2. How do I properly forward from an action to a jsp with the bean 
information intact. 
    Howard> It seems to be very similar to an action returning its "input form" to 
display errors, but 
    Howard> doing this doesn't work.  Whatever I do I seem to get a blank page.

In fact, the best practice is to always preface a page with an action.  You end
up with actions that prepare information for a page, and actions which process
information for a page.  The actions which process the page information will
always have had the form bean created before you get to the action.  However,
the actions which prepare the page information may have to manually create the
form bean and put it into the appropriate scope.

Note that the welcome page for an application would normally be something like
"index.jsp", which does nothing but forward to an action to start the
application.  You can't preface the welcome page with an action, but you can
make it do nothing but go to an action to prepare the real first page.

Look at the source code for the "example" application for some examples of
using the form bean.  The user guide also talks about the control flow with
respect to form beans.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to