Dear Fellow JSP Enthusiasts.

Hi.
I am using RHL6.2-JSWDK1.0.1-Netscape Navigator 4.72-Postgresql Database
6.5-JDK1.2. I am trying to estabish connectivity between web browser and
database using jsp and jdbc.

Please if anyone can send me sample code for doing the same, it will be
highly appreciated.

Basically I am trying to query records from a database using jdbc. I was
able to do using jdbc application. But when I tried to do it using jsp,
i got 500 error in browser and with the following error at console:-

com.sun.jsp.runtime.JspServlet: init
Scratch dir for the JSP engine is: work/%3A8080%2Fexamples
IMPORTANT: Do not modify the generated servlets
Unhandled error! You might want to consider having an error page to
report such error
com.sun.jsp.JspException: Compilation
failed:work/%3A8080%2Fexamples/jsp_0002ftutorial_0002fjdbctest_0002ejspjdbctest_jsp_1.java:69:
'}' expected.
            out.print(_jspx_html_data[1]);
                                          ^
work/%3A8080%2Fexamples/jsp_0002ftutorial_0002fjdbctest_0002ejspjdbctest_jsp_1.java:71:
Statement expected.
                 private Connection con;
                 ^
work/%3A8080%2Fexamples/jsp_0002ftutorial_0002fjdbctest_0002ejspjdbctest_jsp_1.java:75:
Can't specify array dimension in a declaration.
            out.print(_jspx_html_data[2]);
                                      ^
work/%3A8080%2Fexamples/jsp_0002ftutorial_0002fjdbctest_0002ejspjdbctest_jsp_1.java:75:
Identifier expected.
            out.print(_jspx_html_data[2]);
                                        ^
4 errors

        at com.sun.jsp.compiler.Main.compile(Main.java:347)
        at com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:135)
        at
com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:77)
        at
com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:87)
        at
com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218)
        at com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
        at
com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
        at com.sun.web.core.Context.handleRequest(Context.java:414)
        at
com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)

Please help urgently!!!

Thanking you,
Regards

Jayman Dalal


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to