First Program in JSP

What is JSP..?

JSP is Known as Javaserver Pages. JSP was Developed by the Sun

Microsoft System in 1999. JSP is a server side Programming language

Which is Used to create a dynamic Web page. JSP Consists of JAVA Code

Written inside the HTML Code. We save the JSP Program With .jsp

extensions.


JSP Program


Write Your First Program in JSP

1. I-World-Tech.jsp

Here, is the Simple Example To Print a String Hello I-World-Tech


html>
<head>
<title> JSP page </title>
</head>
<body>
<h1> My First JSP Program </h1>
<% out.println ("Hello I-World-Tech");%>
</body>
</html>



How To Run JSP Program

As I Earlier Mention That JSP is a Server Side Programming Language. so

First you Install Apache Tomcat Server Which is the Most Popular Open

Source Web server Developed by the Apache Software Foundation. Apache

Tomcat Server mostly used to Develop JAVA Servlet and JAVA Server

Pages.

Step-1. Download The Apache Tomcat Server

http://tomcat.apache.org/download-60.cgi

Step-2. Install The Apache Tomcat Server in your System.

How we Install Apache Tomcat Server

Step-3. Now, You Copy Above Simple JSP Program, Paste in Notepad and

Save it as I-World-Tech.jsp

Step-4. You run this Program Inside Apache Tomcat Server. In Web

Browser Address bar, you Enter the Full URL According to your System.

Example :

For My System it is http://localhost:8081/deepak/I-World-Tech.jsp

OUTPUT

2. jspexample.jsp

This JSP Program will display The Different Function, Method of the JSP.



<html>
<head>
<title> JSP Example </title>
</head>
<body>

<h1> JSP Program </h1>
<% out.println ("HelloWorld");%>
<br/><br/>
<%=27 %>
<br/><br/>
<%=(Math.random()+5)*2%>
<br/><br/>
<%= new java.util.Date() %>
<br/><br/>
<% if (Math.random() < 0.7) { %>
<B> Facebook </B>
<% } else { %>
<B> Google </B>
<% } %>
<br/><br/>
<%=5>3 %>
</body>
</html>

OUTPUT


Thank You To All My Reader
Deepak Gupta
www.i-world-tech.blogspot.in


Related Post

1. Mini Project in C : Book Shop Inventory System

2. How we Install Apache Tomcat Server

3. How To Install JDK on Windows

4. JDK 8

5. In Visual Basic : How we Convert our statement in Computer Voice

6. javaScript string objects

7. JavaScript Form Validation

8. How We Enable JavaScript in Browser

9. Batch Programming :How To make a Simple Calculator in Batch programming

10. Multimedia Synchronization

Comments