Friday 11, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Wednesday, 6 November 2013

JSP Introduction


JSP – JavaServer Pages

JavaServer Pages (JSP) technology used create web content that has both static and dynamic component.JSP is extension of Java Servlet technology.JSP technology makes available all the dynamic capabilities of Java Servlet technology but provides a more natural approach to create static content.
The main features of JSP technology are given below:
  1. A language for developing JSP pages, which are text-based document that are describe how to process a request and construct a response.
  2. Mechanism for defining extensions to the JSP language.
  3. An expression language for accessing server side object
JSP technology also contains an API that used by developer of web containers.
What is JSP page ?
A JSP page is a text based document that contains two types of text.
  1. static data – which can be express in any text based formats like HTML, SVG, XML, WML .
  2. JSP elements - which constructs dynamic content.
JSP helps developer to insert Java code in HTML page by making use of tags available in JSP.JSP can access all the packages of Java library.
File Extension
File extension for the source file of JSP page is .jsp . The page can be composed of top file that includes other files that contains either a complete JSP page or a fragment of JSP page. The recommended File extension for source file of fragmented JSP page is .jspf .
Simple JSP page
hello-world.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Java Tutorials Corner - Hello World JSP</title>
</head>
<body>
<h2>Java Tutorials Corner - Hello World JSP</h2>
<%out.print("Welcome to Java Tutorials Corner"); %>
</body>
</html>

This simple JSP page. I will explain about tags used in this page, project structure, and how to  run the application in up coming chapter.

Output

hello-worldjsp

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • How to display Image in JSP/HTML from file system using Servlet In this tutorial we are going to see how to display image in web page (HTML , JSP) from web server file system. 1. Create new Dynamic web project by choosing File –> New –> Dynamic Web Project . 2. Create the Project … Read More
  • JSP - Life Cycle The Life Cycle of a JSP Page The Life cycle of JSP can be defined ad the entire process from its creation to till destruction which is similar to servlet life cycle with an additional step which is required to compile JSP i… Read More
  • JSP Syntax - overview This tutorial give the overview of JSP syntax (Element of JSP).We will see the each in detail in upcoming chapters. JSP Syntax JSP Scriptlet JSP Declarations JSP Expressions JSP Comments JSP Directives JSP Action… Read More
  • JSP Introduction JSP – JavaServer Pages JavaServer Pages (JSP) technology used create web content that has both static and dynamic component.JSP is extension of Java Servlet technology.JSP technology makes available all the dynamic capabil… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: JSP Introduction Rating: 5 Reviewed By: eHowToNow