Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
| Search | Today's Posts | Mark Forums Read
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 15th, 2006, 11:15 PM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default jsp and sql connectivity using java beans

hello evrybody,
plsss help me in takin 1 step ahead as i hav no idea how to connect jsp files and the databases that i create usin sql server...using javabeans..that is "useBean". i need a code for the bean that i will hav to create before using it in my jsp file.
let me breif u with the resources that i hav

SQl server 2000,tomcat 5.0.28,,jsdk 1.4.2,NetBeansIDE 3.5.1

can any1 plssss write for me a sample code to make and destroy connections of jsp and sql databeas using beans;it would be really kind of u if u provide me with the beans code as well as simple jsp file to check the connection with a simple database witch can take as input name and age n in the jsp file and directly get enterd into the respective feilds in my database .

thank you in advance...plsssss help me in this

 
Old July 16th, 2006, 06:29 PM
Friend of Wrox
 
Join Date: Jan 2006
Location: San Francisco, CA, USA.
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You seem to have a lot to learn. How far have you gone with Tomcat and JDBC before now? Have you made a simple Tomcat web application using JSPs that pulls data from a database? Here's a good tutorial on how to do that: http://www.informit.com/articles/art...&seqNum=5&rl=1

Once you have that web application set up, it's pretty simple to change it to a useBean-style application. Just abstract the results of the query into a typed object, and have a constructor on it that can fetch data from the database for field population. (Basically take all the JDBC code out of the JSP in the example and put it into your data access object (DAO).) Then your JSP code should be dedicated to the display of DAOs, not the fetching.

Let us know how far along you are and what specific problems you're running into. Good luck!

Jon Emerson
http://blogs.adobe.com/jon.emerson/




Similar Threads
Thread Thread Starter Forum Replies Last Post
Deployment Problem (JSP + Java Beans)!!!! sagar.singh JSP Basics 3 December 7th, 2007 02:03 AM
tomcat error: using java beans rus_1496 Apache Tomcat 6 February 15th, 2005 08:18 PM
Good Project in JDBC,JSP,Servlets,Java Beans Pooja J2EE 3 August 26th, 2004 08:05 AM
JSP Beans Errors harshadriswadkar JSP Basics 0 September 30th, 2003 06:22 AM
how to start with JSP Beans sanket_shakyavanshi JSP Basics 1 September 30th, 2003 03:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.