GTU WTAD Practical 19 : Write a simple JSP page to display a simple message (It may be a simple html page)

GTU WTAD Practical 19 :  Write a simple JSP page to display a simple message. (It may be a simple html page.)

GTU WTAD Practical 19 : Write a simple JSP page to display a simple message (It may be a simple html page)

JSP is very easy language to use at server side. This is optional to Servlet Programming. Selection of either Servlet or JSP is based on the requirement. if your code has much more data about HTML then best solution is JSP. and If your code has most of the functionality of Server Side Scripting then Servlet is best solution. Basically whatever the language you choose the finally it will be converted to Servlet.

Jump to GTU WTAD Practical 20

File Name : index.jsp

File Location : Tomcat_Apache\webapps\gtu19\

<html>
	<head>
		<title>GTU WTAD Practical 19</title>
	</head>
	<body>
	
		<h2 align="center"> GTU WTAD Practical 19 :  Write a simple JSP page to display a simple message (It may be a simple html page) </h2>
	
	
		<%
			out.println("<br><br>Hello using JSP");
			/* This is JSP Comments Line */
			out.println("<br><br><b>Following are the Implicit Objects Available in JSP</b>");
			out.println("<ol><li> request");
			out.println("<li> response");
			out.println("<li> session");
			out.println("<li> out");
			out.println("<li> application");
		%>
	</body>
</html>

File Name : web.xml

File Location : Tomcat_Apache\webapps\gtu19\WEB-INF

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  version="3.0"
  metadata-complete="true">  
  
  <display-name>GTU WTAD Practical 19  </display-name>
  <description> Write a simple JSP page to display a simple message (It may be a simple html page). </description>
</web-app>

 Output

GTU WTAD Practical 19 : Write a simple JSP page to display a simple message (It may be a simple html page)

Leave a Reply