Hi,
I think below code will help you to retrieve from values in action class.
if (form instanceof LoginForm) {
LoginForm theForm = (LoginForm) form;
//retrieve the text data
String user = theForm.getUser();
//retrieve the file representation
String password = theForm.getPassword();
HttpSession session = request.getSession();
if (!user.equals(password)) {
return mapping.findForward("failure");
}
else if (!user.equals("wisper")) {
session.setAttribute("username", user);
return mapping.findForward("userpage");
}
else
return mapping.findForward("adminpage");
}
Thanks & Regards,
Ashok.D
----- Original Message -----
From: "Tapas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 22, 2003 6:56 PM
Subject: Help in Checkbox
> Hi All,
> I am using Struts since last 6 months.
> Right now, I am Facing 2 problems which is described
> below.
>
> 1. In a single page, I am using two form i.e. A
> company form(to add new company) and below that a
> department form.
>
> I would like to add new record to the database and
> for that in the department form I would like to have
> the value of some textboxes of company form. This is
> very easily solved by using ASP/JSP. But using struts
> I don't know how to retrieve the form's value.
>
> 2. In a form I am showing a list of values(a
> checkbox,company's name,url and phone number).
> Below the list, a delete button is ther and when I
> have to press delete button, all the values those are
> been checked should be deleted from the database.
>
> Thanks in advance.Hoping for a quick response from you
> guys.
>
> With regards
> Tapas
>
>
>
>
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>