When you lookup the ejb in your LogonAction you can create a bean wrapping
that info (or even just reuse the EJB bean) and you store this bean under a
request attribute (not parameter).
Make sure your success forward is a non-redirecting forward and this means
the forward will be a server side.
In the jsp you can then access the bean that you put into the request
attribute as its still the same request.
(You can use the struts bean tags, or jstl tags to render the values from
the bean and thus avoid the ugliness of scriptlets)

-----Original Message-----
From: yan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 2 September 2003 17:21
To: [EMAIL PROTECTED]
Subject: ActionForward usage


I have a logon action that verifies a registered user's email address.

<action  path="/logon"
   type="struts.actions.user.LogonAction"
   name="logonForm"
   scope="request"
   input="logon.jsp"
<forward name="success"  path="welcome.jsp"/>
<forward name="failure"  path="registration.jsp"/>
</action>

The logonForm contains just the email address field.

Inside the LogonAction execute method I make a connection to an EJB that
looks up the email address.  If the address is valid it forwards to a
welcome page.

I want the welcome page to display the user's name and affiliated school and
a link to an 'edit details' page.  As I understant it, when you do a '
return (mapping.findForward("success");' , you only have access to the
FormBean's properties that was specified in the relevant ActionMapping
("logonForm") in my case?

Therefore if I want to display information such as 'name' and 'school' for
the relevant user, do I have to embed a <jsp:usebean> scriplet inside the
'welcome.jsp' and make a connection my EJBs from there or is there a way to
forward this info from the LogonAction?

thanks
yan


Kickstart e Solutions. - Intelligent Web Services
[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]

Reply via email to