To create a Servlet application you need to follow the below mentioned steps. These steps are common for all the Web server. In our example we are using Apache Tomcat server. Apache Tomcat is an open source web server for testing servlets and JSP technology.
Introduction to Java Servlets – Servlets in a Nutshell
Steps to Write Java Servlet Program,How to write Java Servlet
There are given 6 steps to create a servlet example. These steps are required for all the servers. The mostly used approach is by extending HttpServlet because it provides http request specific method such as doGet , doPost , doHead etc. The directory structure defines that where to put the different types of files so that web container may get the information and respond to the client. The Sun Microsystem defines a unique standard to be followed by all the server vendors. Let's see the directory structure that must be followed to create the servlet. As you can see that the servlet class file must be in the classes folder.
Because Java runs in the database in the context of the database server process, the ways you can deploy and run Java code are restricted to the following:. The Java implementation in the server can natively move data from the database to the network without converting character data through UCS-2 Unicode which is required by Java strings. It is often easier to debug Java programs outside of the database server, as well. They are not intended as a platform for developing an entire Internet application.
This chapter describes what is new and changed in recent servlet specifications, and how to create and configure servlets. These sections summarize the changes in the Servlet programming model and requirements between Servlet 3. WebLogic Server supports the servlet 3.