#HTTP Eroor 500- unable to compile jsp class

22 messages · Page 1 of 1 (latest)

novel tide
#

Hi.... I am getting Http error 500...unable to compile jsp class while trying to connect my project to Mysql db through eclipse....it seems to be an issue with the out.print statement in my index.jsp file coz when I remove that statement...other jsp files are running on localhost as expected....hope someone could help?

P:s - I read somewhere that there shouldn't be any statement with ; in jsp file so how do I correct line 15 in my index.jsp file as in image below:

lime fiberBOT
#

This post has been reserved for your question.

Hey @novel tide! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

novel tide
#

How to correct line 15 in my index.jsp file

#

This is my DbCon.java file

outer heath
#

What's the compilation error

novel tide
#

I am getting Http error 500...unable to compile jsp class while trying to connect my project to Mysql db through eclipse....it seems to be an issue with the out.print statement in my index.jsp file coz when I remove that statement...other jsp files are running on localhost as expected....

P:s - I read somewhere that there shouldn't be any statement with ; in jsp file so how do I correct line 15 in my index.jsp file as in image below:

outer heath
#

Share the stack trace here?

novel tide
#

Ok

novel tide
outer heath
#

Issue is dbcon isn't initialised anywhere

#

Not related to semicolons

#

You just stated using a variable called dbcon without declaring it

novel tide
#

Ok

novel tide
outer heath
#

Note this isn't very good design but I assume you don't care about that at the moment

novel tide
#

Yes...i just wanna make a connection to my db(rough project

outer heath
#

Look at the example in this stackoverflow question and the accepted answer

novel tide
#

Ok....checking now

novel tide
#

@outer heath Thanks so much.... It's working now, all errors gone 🙂

outer heath