Home arrow Java arrow Page 3 - Build a Servlet-Based Application that Executes SQL Statements Against a Database
JAVA

Build a Servlet-Based Application that Executes SQL Statements Against a Database


Dynamically interact with an SQL database using JSP and Servlets. Joel's article takes you through the processing of building your own "SQL Gateway"

Author Info:
By: Joel Murach
Rating: 4 stars4 stars4 stars4 stars4 stars / 16
September 21, 2003
TABLE OF CONTENTS:
  1. · Build a Servlet-Based Application that Executes SQL Statements Against a Database
  2. · Prerequisites
  3. · The User Interface
  4. · The Code for the JSP
  5. · The Code for the Servlet
  6. · The Code for the Utility Class
  7. · Conclusion and Related Links/Resources

print this article
SEARCH DEVARTICLES

Build a Servlet-Based Application that Executes SQL Statements Against a Database - The User Interface
(Page 3 of 7 )

Here's the user interface for the SQL Gateway application after it has executed an INSERT statement:

As you can see, the bottom of the page shows a message that indicates the number of rows that were affected by the statement. If the SQL statement is a SELECT statement that runs successfully, the result set will be displayed within an HTML table as shown here:

Of course, if the SQL statement doesn't execute successfully, the result will be a message that displays information about the exception that was thrown.


blog comments powered by Disqus
JAVA ARTICLES

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials