JSP tutorial- first program

JSP tutorial- first program


JSP (JavaServer Pages)

First program

Now, it is the time to start writing a Jsp page. Open a text editor (e.g. Notepad) and type the following code.

<html>

<head>

  <title>My first Jsp page</title>

</head>

<body>

<!--Your Jsp code   -->

<%@ page language="java" %>

<% out.println("<H1>Jsp is powerful.</H1>"); %>

</body>

</html>

Save the file as myfirst.jsp in a folder (e.g. MyJsp_source_files) that locates in the default web server directory (C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps).

jsp directory list

 

 

Open your web browser and type:

http://localhost:8080/MyJsp_source_files/myfirst.jsp




Comments




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.