Example Program in JSP

What is the Syntax of a JSP Program?
How to write a simple JavaServer pages code?


To give an example for a JSP code, first we are going to print the text "Hello Hiox". Try the the following syntax code.

Example :

<! -- This is the JSP file-->
out.println ("Hello HIOX");
Result :
Hello HIOX

A JSP file looks just like a html file with some java code inside some tags. The server recognizes the code
by the file extension "*.jsp" by which it is saved, now save the file as "first.jsp" in the "test" folder. Subsequent requests for the same jsp page will use the same object just created.

Ask Questions

Ask Question