This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

adding data to database  RSS feed

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
amit bhadre
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I will ask only questions ..and I will write full sentences.

rgds
amit bhadre
 
Author and ninkuma
Marshal
Posts: 66797
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
amit bhadre
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry sir

it should be

regards
amit bhadre
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66797
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!