This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Ranch Hand

Joined: Dec 16, 2010
Posts: 632
    
    7

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.

"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
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: 60045
    
  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: 60045
    
  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..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display data from database in JSP - MVC
 
Similar Threads
Databse Problem
Problem in returning the username
Everytime getting an empty ResultSet
problem in connecting to oracle through jdbc
Java to Display Data from Database