Java Servlet Programing Laungage

Java Servlet Projects

Servlet Project 3

adplus-dvertising
Java Servlet :How a Servlet Works, Steps to run your first Servlet
Previous Home Next

After you have installed and configured weblogic server or any other server.Basically you need to follow six steps to go from writing your servlet to running it.These steps are as follows:-

  1. Create a directory structue,i.e; first you need to create a folder and give the name of that folder,after that you make a new folder under the previous folder and give the name of that folder.The folder name must be "WEB-INF".Put the ..html file parallel to the WEB-INF folder.Under the WEB-INF folder,creater a folder and give the name of that folder.The folder name must be "classes" and put the .xml file parallel to the classes folder.Under the classes folder put all the .java files.
  2. Write the servlet source code. You need to import the javax.servlet package and javax.servlet.http package in your source file.
  3. Compile the source code.
  4. Start the server.
  5. Deploy the application.
  6. Call your servlet from a web browser.
Previous Home Next