Friday 5 July 2013

Introduction to JSP

// siddhu vydyabhushana // 3 comments
Jsp stands for “Java server page”.

JSP are built by SUN Microsystem.

JSP enable the developers to directly insert java code into jsp file, this makes the development process very simple and its maintenance also becomes very easy.

JSP simply place JAVA inside the HTML pages means it’s an embedded of html tag and jsp’s own tag.
The extension of jsp page is ".jsp"

Java is known for its characteristic of "write once, run anywhere." and JSP page is a combination of java code into html file so we can say that the JSP pages are platform independent means .jsp pages can run in any platform.

The following example contains the simple html code.
File name: simple.html
 <html>
  <head>
     <title>web page</title>
  </head>
  <body>
    <p><b>This is a simple demo of creating a web page.</b><p> <br>
  </body>
</html> 

The output of above program is: This is a simple demo of creating a web page.
Now, just change this HTML page extension to ".jsp" instead of ".html" extension so the file name becomes “simple.jsp” and now it’s became a simple jsp file.
File name: simple.jsp
 <html>
  <head>
     <title>web page</title>
  </head>
  <body>
    <p><b>This is a simple demo of creating a web page.</b><p> <br>
  </body>
</html> 

The output of above program is: This is a simple demo of creating a web page.
NOTE : The simple .java file which is run on server side is called Servlet. For the detail of Servlet you can visit the Servlet technology in our site.
- See more at: http://www.java2all.com/1/2/4/10/Technology/JSP/JSP-introduction/Introduction-to-JSP#sthash.YOrPHvG0.dpuf

3 comments: