aspose file tools*
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
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: 1043
    
  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: 61654
    
  67

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: 61654
    
  67

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