It might help to know exactly what exception occurred. But, first and foremost, you should not be doing this type of action in a JSP.
And this "an exception occurred" doesn't help.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
have you declared "stmt" anywhere?
JSP "should" be used for the interface, and you should leave the data retrieval, entry etc... to java services, but for a school project I really wouldn't worry about it.
sillyboy
Practically a Master Poster
686 posts since Mar 2007
Reputation Points: 85
Solved Threads: 64
but for a school project I really wouldn't worry about it.
I disagree with that one, School projects are supposed to teach you how you should do things the "RIGHT" way, the way things are supposed to be done.
Even if this is a school project I suggest you at least try to follow to some degree the Model View Controller Architecture discussed in this sticky thread .
stephen84s
Nearly a Posting Virtuoso
1,443 posts since Jul 2007
Reputation Points: 668
Solved Threads: 154
Hi, how do I make it show the exact exception that occured?
Post the entire stacktrace that's provided in your logs.Why should I not be doing this action in a JSP page? What else would I do it in?
Because JSP's are only the "view" portion of MVC. You should not be performing "actions" in the JSP that actually belong to either the control or model layers. Think "Beans" and "Servlets". JSP's should do nothing but display pages.Its a PHP assignment that I did, but I must rewrite all the PHP code into JSP.
Thanks,
So write it properly. See the link above.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
That is nice you been able to locate log, but you misinterpreted requirements. You need to post the section after start up once you attempt to insert something as that is causing trouble no start up
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
lol yeah, if you have something like tail, monitor the log file, and replicate the error.
sillyboy
Practically a Master Poster
686 posts since Mar 2007
Reputation Points: 85
Solved Threads: 64