You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by AngeloChen <an...@yahoo.com.hk> on 2007/08/17 07:28:24 UTC

newbie's question

Hi,

New to Struts, I have a need like this:

If my LoginAction verify that the user is valid, it will retrieve a list of
emails addressed to him from model and send all of them to a yourEmail.jsp.
now as I understand from the doc that for every jsp you have to create a
form-bean/ActionForm, so how can I populdate this bean with all the data and
forward to yourEmail.jsp in the LoginAction class?

Thanks,

AC
-- 
View this message in context: http://www.nabble.com/newbie%27s-question-tf4283762.html#a12194251
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: newbie's question

Posted by meisam sarabadani <me...@gmail.com>.
Hi, Im new to Struts too!

But i need to be very quickly come up with a login and log out part for my
application which im going to use the Struts, I need to retrieve the user
name and password from the Mysql database then check it with a form values,
would you send me a piece of code or something then I can manage to start to
write the login part of my application.

thank you

On 8/17/07, Laurie Harper <la...@holoweb.net> wrote:
>
> AngeloChen wrote:
> > Hi,
> >
> > New to Struts, I have a need like this:
> >
> > If my LoginAction verify that the user is valid, it will retrieve a list
> of
> > emails addressed to him from model and send all of them to a
> yourEmail.jsp.
> > now as I understand from the doc that for every jsp you have to create a
> > form-bean/ActionForm, so how can I populdate this bean with all the data
> and
> > forward to yourEmail.jsp in the LoginAction class?
>
> You don't have to create a form bean for every action/jsp. Form beans
> are used for populating and capturing input from forms; if your page
> doesn't have a form, it doesn't need a form bean.
>
> For the simple case of just exposing data from your action to render in
> the JSP, you can just put the data in request (or session) scope and
> access it from there.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Appreciated much,

Meisam Sarabadani
IBM Student Ambassador
Vice president II, IT Society
Multimedia University, Cyberjaya Capmus
------------------------------------------------------------------
"The day the Lord created hope was probably the same day he created
Spring."              Bern Williams.
------------------------------------------------------------------

Re: newbie's question

Posted by Laurie Harper <la...@holoweb.net>.
AngeloChen wrote:
> Hi,
> 
> New to Struts, I have a need like this:
> 
> If my LoginAction verify that the user is valid, it will retrieve a list of
> emails addressed to him from model and send all of them to a yourEmail.jsp.
> now as I understand from the doc that for every jsp you have to create a
> form-bean/ActionForm, so how can I populdate this bean with all the data and
> forward to yourEmail.jsp in the LoginAction class?

You don't have to create a form bean for every action/jsp. Form beans 
are used for populating and capturing input from forms; if your page 
doesn't have a form, it doesn't need a form bean.

For the simple case of just exposing data from your action to render in 
the JSP, you can just put the data in request (or session) scope and 
access it from there.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org