Masaoud,

You have to remember that the JSP pages are server-side, while the buttons
and GUI are a result of client-side display.
Pressing a button on your form can do nothing vis-a-vis the JSP.  What you
can do is submit the form (along with all the
parameters) to a jsp.  The jsp can now process the form and call a method in
your bean, and put all the various data into
the bean's member variables.  It must then, however, end up displaying a new
page (perhaps it looks the same as the old page), but you do need to display
something.

Further, unless you do somehow keep track of sessions, this won't be very
useful as you will loose your bean state between calls to the JSP page.
Note that I'm fairly sure there is a means of session tracking, though, as
I'm also fairly new to this, it's not very clear to me how that works.

-AMT

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Masaoud
> Sent: Monday, November 22, 1999 10:40 PM
> To: [EMAIL PROTECTED]
> Subject: How to invoke a bean method in a JSP using a HTML Form Button
>
>
> Hi,
>
> I have a JSP which uses a bean. There is a Form that is present in the
> JSP. This Form contains some TextFields and a Button.
>
> When I click this Button I want to do the following :
>     1. Call one of the methods in my Bean.
>     2. Get all the data that was inputed in the text fields into the
> Beans member variables.
>
> How can I do the above without using JavaScript.
>
> One more doubt I had, is that is there any Session Tracking
> Functionality provided with JSP's.
>
> Thanx,
> Masaoud.
>
> ==================================================================
> =========
> 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