JSP Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
JSP Tutorial
Introduction Introduction
Installing JDK-Windows Installing JDK-Windows
Installing JDK-Linux Installing JDK-Linux
Installing Tomcat Installing Tomcat
Simple Program in JSP Simple Program in JSP
Pre-defined Variables Pre-defined Variables
Syntax of Tags Syntax of Tags
JSP Expression Language JSP Expression Language
JSP EL Operators JSP EL Operators
EL Implicit Variables EL Implicit Variables
Scopes Scopes
Using Arrays Using Arrays
Methods Methods
JSP Elements JSP Elements
Including Beans Including Beans
JSTL Tags JSTL Tags
Custom Tags Custom Tags
Session Session in JSP
Handling Cookies Handling Cookies
JSP Application Structure JSP Application Structure
Configuring web.xml Configuring web.xml
Tomcat Configuration Tomcat Configuration
JSP Examples JSP Examples
Forums Ask Your Doubts
Feedback Feedback
 






outsourced web hosting support

Example Program in JSP


Tutorials Jsp

Topic

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



Explanation

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:
    <html>
    <body>
    <! -- This is the JSP file-->
    <%
      out.println ("Hello HIOX");
    %>
    </body>
    </html>
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.




A Note
JSP(Java Server Pages) is one of the most used Server Side Programming Language in the world. Simple introduction, basic program codes with examples. Begin coding your own JSP scripts with this online tutorial. Hope you enjoy this tutorial. Do send your feedback or suggestions on this JavaServer Pages tutorial. This is a copyright content.


Other Links

web hosting