This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Display data from database in JSP - MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Display data from database in JSP - MVC " Watch "Display data from database in JSP - MVC " New topic
Author

Display data from database in JSP - MVC

C Grey
Greenhorn

Joined: Sep 05, 2012
Posts: 4
Hi All,

I would like to ask help regarding my code.. I am trying to access the xe database and display the data to jsp..
Right now there is no error but the data is not showing..
After I updated my web.xml, I got an error.

Btw, I am trying to establish a MVC archtecture here.
Any thoughts would be appreciated.

here is my code:

DBConn.java


Employee.java



index.jsp



web.xml


ERROR:
J. Kevin Robbins
Bartender

Joined: Dec 16, 2010
Posts: 853
    
  13

You say there are no errors, but how can you tell? You are swallowing all the exceptions. At least put a printStackTrace in your catch blocks and try again.

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
C Grey
Greenhorn

Joined: Sep 05, 2012
Posts: 4
Hi JK,

I have put printStackTrace on the catch.. I have edited my post.. Still nothing...
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi C Grey,

Try putting
in your jsp.. It might work not sure.Reason i will let you know if it works.

Regards
Jatan
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

It should not be necessary to put that directive in the JSP.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
C Grey
Greenhorn

Joined: Sep 05, 2012
Posts: 4
Hi All,

After I change my web.xml to point to index, I finally got an error lol...
Please check my updated post..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

C Grey wrote:Please check my updated post..

Please do not go back and revise your previous post -- post a reply with changes. Now the responses that follow your post look wrong because you changed the post.
C Grey
Greenhorn

Joined: Sep 05, 2012
Posts: 4
Bear Bibeault wrote:
C Grey wrote:Please check my updated post..

Please do not go back and revise your previous post -- post a reply with changes. Now the responses that follow your post look wrong because you changed the post.


Okay sorry about that.. wont'do it next time..
 
Don't get me started about those stupid light bulbs.
 
subject: Display data from database in JSP - MVC
 
Similar Threads
Problem in returning the username
Java to Display Data from Database
problem in connecting to oracle through jdbc
Databse Problem
Everytime getting an empty ResultSet