This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC connection using bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC connection using bean" Watch "JDBC connection using bean" New topic
Author

JDBC connection using bean

Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
hi ranchers

i am trying to connect to the oracle database with the help of beans & jsp
i am not that familiar with and i am using netbeans as an interface
can you please help me with the procedure of connecting to the database

i have created a database in oracle of name emplyoee with first name ,last name and empno

this is my bean page


and this is my jsp page



ITS SHOWING ME AN ERROR in jsp page i have specifed it below
please help me with the procedure and rectify errors if any

<jsp:useBean id="db" scope="request" class="DbBean" /> //ERR CANNOT FIND SYMBOL

Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

What is the error ?


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37902
    
  22
What error?
Amol More
Greenhorn

Joined: Jan 22, 2010
Posts: 29
the error i am getting is cannot find symbol in the jsp page at the line 22
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

I agree this is poor practice. That said, where is the code that sets DBBean in the request? It should be in a servlet somewhere. If it doesn't exist, that explains why the bean isn't in the request.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC connection using bean
 
Similar Threads
JSP Error
Error is [Microsoft][ODBC SQL Server Driver]Connection is busy
error due to accessing database connection using jsp
Error in JSP when using bean concept
Is it correct(Hashmap in jsp)