Perhaps a good way to start is to look at a simple Servlet. Java code can execute within an application server associated with a web server using Java Servlets. The first step is to create a web application. If you are in Eclipse you can create a dynamic web project. I called my web application 'bio' and the root is a directory with the same name. This class is a simple example of a Servlet. The source code is in file HelloServlet.java.
Create a directory called WEB-INF within bio. Within WEB-INF you need to define a web application file called web.xml. Here is my web.xml file. I have mapped the Servlet to a relatvie URL of 'hello'.
You will need to compile the class with a Servlet API jar file. Place the compiled class in the directory bio/WEB-INF/classes. You can optionally bundle the directory structure into a Web Application aRchive (WAR) file, like bio.war. Place this in the webapps directory of your application server and try it out by bringing up the page 'http://localhost:8080/bio/hello', making allowances for the host name and port of your server.
There are no user comments.
Please send ideas and opinions by email at alexamies@gmail.com.