Signup/Sign In

Creating a JSP Page

A JSP page looks similar to an HTML page, but a JSP page also has Java code in it. We can put any regular Java Code in a JSP file using a scriplet tag which start with <% and ends with %>. JSP pages are used to develop dynamic responses.

To learn HTML, go to HTML Interactive Course and learn HTML while practicing it side by side.


Example of creating a JSP Page in Eclipse

  • Open Eclipse, Click on New → Dynamic Web Project
  • creating a JSP Page in Eclipse


  • Give a name to your project and click on OK
  • creating a JSP Page in Eclipse


  • You will see a new project created in Project Explorer
  • creating a JSP Page in Eclipse


  • To create a new JSP file right click on Web Content directory, New → JSP file
  • creating a JSP Page in Eclipse


  • Give a name to your JSP file and click Finish.
  • creating a JSP Page in Eclipse


  • Write something in your JSP file. The complete HTML and the JSP code, goes inside the <body> tag, just like HTML pages.
  • creating a JSP Page in Eclipse


  • To run your project, right click on Project, select Run As → Run on Server
  • creating a JSP Page in Eclipse


  • To start the server, Choose existing server name and click on finish
  • creating a JSP Page in Eclipse


  • See the Output in your browser.
  • creating a JSP Page in Eclipse