| Author |
adding data to database
|
amit bhadre
Ranch Hand
Joined: Jan 23, 2006
Posts: 124
|
|
HI 2 all, I want to add data from jsp page to data base. I written connection for data base in scriplet page. In jsp page I have 1 textarea named as Notes.After clicking the submit button it should add to database through action/any type. I am using backend database sql server. Thanks in advance its urgent plz ..... cheers amit bhadre [ June 07, 2006: Message edited by: amit bhadre ] [ June 07, 2006: Message edited by: Bear Bibeault ]
|
Thanks advance who ever answers this question.
regards
amit bhadre
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
amit bhadre, Welcome to JavaRanch! In an effort to help you get the most from our forums, we've compiled a list of tips for asking questions here. You can find the list in our FAQ section here. In particular, please see EaseUp. Please, also see: UseRealWords Abbreviations such as '2' instead of to and 'plz' instead of 'please' confound language translation software making it difficult for our non-English speaking members to read your post. Again, welcome to JavaRanch and good luck with your question. -Ben
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
amit bhadre
Ranch Hand
Joined: Jan 23, 2006
Posts: 124
|
|
Sorry I will ask only questions ..and I will write full sentences. rgds amit bhadre
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
Originally posted by amit bhadre: Sorry I will ask only questions ..and I will write full sentences. rgds amit bhadre
Except for "rgds" it seems.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
amit bhadre
Ranch Hand
Joined: Jan 23, 2006
Posts: 124
|
|
I am sorry sir it should be regards amit bhadre
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
|
So what aspect of this issue are you having problems with? Obtaining the value of the text area? Writing the JDBC code? Something else?
|
 |
amit bhadre
Ranch Hand
Joined: Jan 23, 2006
Posts: 124
|
|
I want to add login name and password to data base....? So how to do that? Thanks in advance. tel me in two ways like by using bean and by scriplet also.
|
 |
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1003
|
|
Well you do it an a few steps 1 - retrieve parameters from the web page into a variable. Often that is done with request.getParameter("nameOfFieldOnPage"); Alternatively you can use <jsp:useBean> and <jsp:setProperty> and populate a bean which has properties the same as the parameters from the page. Or you can get a framework to do that for you. 2 - obtain a database connection. Preferably from a connection pool, or a bean provider, rather than writing database code into a JSP. 3 - run sql to insert the values (see JDBC Tutorial
|
 |
 |
|
|
subject: adding data to database
|
|
|