In this section we will show you how you can create JSP page and then test on tomcat server. Creating a new JSP page is very simple and any text editor can be used.
In this example I will show you how to create a simple JSP page that prints current date and time on the browser.
Java date class is used to get the current date and then print on the web browser.
Steps to Create JSP page:
Open note page and then paste the following in the note pad.
contentType="text/html" import="java.util.*" %>
Save the file and enter the file name "date.jsp" and click on the "Save" button.
Note that the file name is enclosed in double quotes "date.jsp".
Now deploy the application and test it. If you don't have any experience in tomcat, learn it at our Tomcat Tutorial page.
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: November 1, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles