Apache Tomcat & Quick Tutorial
Requirement: Java Runtime Environment (JRE) must be installed
Go to http://tomcat.apache.org/ In download section, pick the latest version (Tomcat 6.x)
Scroll down and click ‘Windows Service Installer’ Save the file, and execute it
Click Next until you come to this step Select ‘Full’ for type of install
Click Next until you come to this step Make sure the JRE is installed and the directory is valid
After the installation, test the configuration by going to http://localhost:8080/ If it’s successful, the webpage with the following words will appear This address is actually the directory of ‘C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps’
For tutorial, go to http://www.jsptut.com/ Under section “Getting familiar with your JSP server”, copy the following HTML codes <HTML> <BODY> Hello, world </BODY> </HTML>
…and paste it in the Notepad Save the file as ‘test.jsp’ into this directory: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\examples
In your web browser, go to http://localhost:8080/examples/test.jsp If it’s successful the word ‘Hello World’ will appear
Next, try the following Java embedded codes <HTML> <BODY> Hello! The time is now <%= new java.util.Date() %> </BODY> </HTML>
The ‘<%= new java. util The ‘<%= new java.util.Date() %>’ is Java embedded, with the use of ‘<%= (java embed) %>’ The output will be:-