My First JSP Page - hello.jsp
This section provides a tutorial example on how to create the first JSP page with JSP code to test the JSP support of the Tomcat 7 Web server.
The next think I need to test is to create Web page with JSP (JavaServer Page) codes.
1. Create a text file called hello.jsp with the following JSP code:
<% out.println("Hello world! -- From JSP"); %>
2. Save this JSP file to the default application folder:
3. Run a Web browser with this URL: http://localhost:8080/hello.jsp.
You should see the "Hello world! -- From JSP" message in the browser:
Congratulations again! Now, we have confirmed that Tomcat 7 server is running as a Web server that supports JSP pages:
- Name your JSP files with the .jsp extension like, some-page.jsp.
- Save your JSP files to the default folder, C:\local\apache-tomcat-7.0.32\webapps\ROOT\, to serve it a JSP page.
- Visit your JSP page with the base URL and file name like, http://localhost:8080/some-page.jsp.
Last update: 2012.
Table of Contents
About This Book
JSP (JavaServer Pages) Overview
►Tomcat 7 Installation on Windows Systems
Downloading and Installing Tomcat 7
Launching Tomcat 7 Server
Verifying Tomcat 7 Server
Setting Up Tomcat 7 Server Admin Access
Reviewing Tomcat 7 Server Status Page
Tomcat Web Application Manager
My First HTML Page - hello.html
►My First JSP Page - hello.jsp
JSP Scripting Elements
Java Servlet Introduction
JSP Implicit Objects
Syntax of JSP Pages and JSP Documents
JSP Application Session
Managing Cookies in JSP Pages
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Performance of JSP Pages
EL (Expression Language)
Overview of JSTL (JSP Standard Tag Libraries)
JSTL Core Library
JSP Custom Tags
JSP Java Tag Interface
Custom Tag Attributes
Multiple Tags Working Together
File Upload Test Application
PDF Printing Version