MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

JSP

JSP Projects

JSP Project

First JSP program.
Previous Home Next

 

In this section you will learn how to create your first JSP page and then run on the Tomcat Server. Tomcat server is one of the most popular Servlet Container for deploying and running the Java based application. In this topic you will learn how to make your web application and run on Tomcat Server.
Java Server Pages is simple text file with .jsp extension and it contains HTML code along with embedded Java Code. JSP file is compiled into Servlet and then run on the Tomcat. Tomcat server automatically compiles the JSP file into Servlet.

Simply inside the HTML code using H1 heading we write Hello World!

Directory Structure of Web Application
/myjsp/
     index.jsp
             WEB-INF
                          web.xml
                                       classes
                                                    lib
You should save the "index.jsp" file into the root of the web application as shown below.

 


 

<%--
Document : index
Created on : Mar 5, 2011, 12:36:04 AM
Author : R4R
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<p>
This is my first web page
</p>
</body>
</html>

Hello World!

This is my first web page

Previous Home Next