Reg,

Can you clarify a bit?  I've 3 questions....

1) How many fields are there on the form you submit for processing to this
page?
2) Does setAccount do anything beyond assigning argument account to private
member
        account?
3) How and when do you display the value of account?  Immediately after you
do the
   setProperty?

-AMT

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Reg Sherwood
> Sent: Tuesday, January 04, 2000 2:26 PM
> To: [EMAIL PROTECTED]
> Subject: Setting Properties within servlets/beans from JSP
>
>
> Hi,
> I want to do the following....
>
> 1) Use an input file in my HTML/JSP source... eg: <..... input
> type="text" name="account" size="4" .... >
> 2) Have the user fill in the required fields and have the value they
> have supplied accessible to a bean. ie: Upon some button being pushed
> have the value of the input field (ie: name) set a corresponding value
> in a bean to be used to perform some processing.
>
> Example:
> <jsp:useBean id="searchcriteria" scope="session" class="SearchBean" >
> <jsp:setProperty name="searchcriteria" property="account"
> </jsp:useBean>
>
> I also have a class called SearchBean (for lack of a better name)... it
> has a private member called account.  Two additional methods have been
> supplied setAccount(String account) and getAccount().  From what I have
> read I should be able to use jsp:setProperty.  Or would it  be more
> efficient to use the request object and the getParameter("account")
> method inside a servlet?
>
> I have tried the above but all I can seen to set is null.....
>
> Thanks,
>
> Reg Sherwood
> [EMAIL PROTECTED]
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to