Hello Everyone,
This is my first
java servlet &
jsp program. There are two pages- registration form with INSERT / doPost() method and the second one is view record page with SELECT/ doGet() method. Register page has a form that accepts and inserts record and view_record is a page that displays all records using SELECT query.
Register page works fine and adds record to SQL database but when I try to run view_record (servlet page) in browser through NetBeans, it gives me a blank screen with servlet page's directory path. No error, no warning nothing, just a blank page. see the attached screenshot.
Any idea why is this happening? I tried this on multiple computers but didn't work on any.
OS: Windows Vista 32 bit.
IDE: Netbeans
Database: MysQL (Using MySQL Workbench)
Here is my code:
index.html
Servlet code (page name: register.java)
Code for view_record servlet (view_record.java) - this is what not working
Strange thing is I don't get any error in code or on browser and yet this does not work. It should show up the records in a tabular format but instead it only shows blank screen with Servlet's directory path on the screen.