'JSP' Java Program :-

To create the first JSP page, write some HTML code as given below, and save it by .jsp extension. We have saved this file as index.jsp. Put it in a folder and paste the folder in the web-apps directory in apache tomcat to run the JSP page.
index.jsp
Let's see the simple example of JSP where we are using the scriptlet tag to put Java code in the JSP page. We will learn scriptlet tag later.


<html>  
<body>  
<% out.print(2*5); %>  
</body>  
</html>  

Output:


It will print 10 on the browser.

			

Previous Next