JSP Examples

In this section we will discuss about the examples of JSP. This section will help you create web applications using JSP.

JSP Examples

JSP Examples

In this section we will discuss about the examples of JSP.

This section will help you create web applications using JSP. In this page you will find various examples of JSP which would help you understand how to work with sessions, cookies in JSP, how to write Date in JSP, how to access database in JSP, how to implement JavaScript into JSP, how to show data from database into the JSP page, break statement in JSP, how to create various components in JSP, JSP scriptlets, JSP tags, JSP custom tag and many more that you can do in JSP.

Before starting to create example using JSP we should have focus on the following requirements :

  • First of all you should have installed the JDK in your computer. For example, jdk 1.6
  • A JSP Web Server should be installed. For example Apache Tomcat , Oracle WebLogic, IBM WebSphare.
  • A Web Browser should be installed. For Example, Mozilla, Chrome, IE etc.
  • An IDE (if you need to create your application using IDE). For example, Eclipse, NetBeans etc.

We will use Apache Tomcat as Web Server for deploying application and the Eclipse IDE for writing and compiling the code. You can download (if not downloaded) JDK, Tomcat, and Eclipse IDE from the official website of Oracle, Apache Foundation and Eclipse respectively.

Follow the links given below to know how these can be downloaded and installed in your computer.

After completing of all your downloading and installing processes you are ready to create applications using JSP. Following links will help you in to create web applications using JSP. Go through the links and explore your knowledge.

  • JSP Hello World Example : In this page you will see a basic example of JSP. In this example you will see how a JSP application is created and run.
     
  • JSP Scriptlet : In this tutorial you will learn about the scriptlet in JSP. In this example you will see the use of scriptlet tag in JSP.
     
  • JSP Declaration : In this tutorial you will learn about the how to declare fields and methods in JSP. In this example you will see the use of declaration tag in JSP.
     
  • JSP Expressions : In this tutorial you will learn about the expressions in JSP. In this example you will see how to use express tag in JSP.
     
  • How to write Date in JSP : This page describes you about how to use Date in JSP. In the example you will see how Date object can be instantiated and display the current time.
     
  • JSP Actions : In this page you will learn about the actions in JSP. This page explains the various action tags of JSP.
     
  • How to read request information in JSP : In this page you will learn about how to read the request information in JSP.
     
  • How to access database in JSP : In this section you will learn about how to access database in JSP. This example describes you the database accessing using MySQL.
     
  • How to work with Session in JSP : In this page you will learn about working with session in JSP. In this example page you will see how session is created, and how session is invalidated.
     
  • How to work with Cookies in JSP : In this page you will learn about working with cookies in JSP. In this example page you will see how cookies can be created and how to delete cookies.
     
  • Implement JavaScript with JSP : In this page you will learn about how to use JavaScript in JSP.

Some miscellaneous examples

For more tutorials follow the link : http://www.roseindia.net/jsp/