The blog enlighten a user how to create a JspDynPage, what precisely happens when we create a JspDynPage? And what Bean Should we choose? using client side eventing the jsp page , accessing a database from the application.
A JspDynPage consists of three types of file.
- .java file
- Bean file
- Jsp file
The most significant thing when we create a JspDynPage is what kind of Bean should be used .The answer to this is “ it depends what exactly your application want “
- Create a JspDynPage
- .While Creating a Jsp Dynpage you need to choose the type of the Bean. The Details about the scope of bean is explained very methodically at
Our objective now is to fetch the data entered in the UI. Following Code Snippet shows how to pick data for the elements defined in the HTMLB in JAVA file.
Here the value obtained is stored inside the variable sFname which is defined globally .( that is why we are using “this” operator)
- Storing Data in the database. Please Once go through the concepts of Prepared and callable statements .(NOTE :- The code uses prepared statement as we are trying to insert a value in the database.insert is a DDL statement.)
I have more or else covered what I intended to do so .I have not put in all the codes since the basic intension of mine was to make user aware of the way .
I may have missed on Certain aspects .Please let me know so that next time I can rectify these.