aspose file tools*
The moose likes JSP and the fly likes javabeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "javabeans" Watch "javabeans" New topic
Author

javabeans

mano Shetty
Greenhorn

Joined: Feb 27, 2007
Posts: 6
I started learning now about javabean concept.Can anyone help me to write jsp using javabean to do insert,update,delete operations in database .
Rao Raghu
Ranch Hand

Joined: Jan 05, 2007
Posts: 100
This should guide you.


RAGHU<br /> <br />"When the going gets tough, the tough get going"
mano Shetty
Greenhorn

Joined: Feb 27, 2007
Posts: 6
10qs 4 advice.It is ok but at present i need only a simple procedure to write jsp code for doing operations on database using java beans
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Originally posted by mano mano:
10qs 4 advice.


Please use real words when posting to the forums. Words like "thanks" and "for". Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

"mano mano",

Additionally, there aren't many other rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

bear
JavaRanch Sheriff
Rao Raghu
Ranch Hand

Joined: Jan 05, 2007
Posts: 100

10qs 4 advice.It is ok but at present i need only a simple procedure to write jsp code for doing operations on database using java beans


You can write the JDBC code in a java class to connect to your DB and place it under WEB-INF/classes. Remember that javabeans dont have a main() method. You have to write the getter and setter methods in the javabean, in which you will be setting those properties which you desire to persist to the DB. When the user submits the fields to be entered, the control has to go to another jsp or a servlet, wherein you will be retrieving those fields with req.getParameter(). Now in the same jsp/servlet you have to use the jsp action <jsp: useBean id="" class=""> and call the setter methods and the method that makes JDBC connection.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javabeans