The following JSP Practice Exercise contains beginner’s lever programs on Java Server Pages (JSP). Basically, JSP is a technology that we can use to create dynamic web applications. Furthermore, JSP is built over servlet technology. So, it provides us the additional capability such as JSP Standard Tag Library (JSTL).
For the purpose of creating the following applications, you can use the Eclipse IDE that runs the Apache Tomcat server.
- Write a program in JSP to display “Hello, World!”.
- Find sum of two numbers using JSP.
- Write a program in JSP to display the given text in a paragraph in different font sizes using a loop.
- Create a dynamic web application in JSP to find the grade according to the marks entered by the user using the switch statement.
- Build an application in JSP to calculate factorial of a number using recursion.
- Write a program to create a JSP method that accepts a number and returns its double.
- Use Page directive in JSP to display the current date.
- Create a summation method in JSP that accepts an array and display the sum of its element.
- Write a program to create a JSP page called alert message JSP that displays alert messages if username & password fields are blank and displays welcome user otherwise.
- Develop an application to demonstrate the include directive in JSP to display the current date from another JSP page.
- Write a program in JSP to display the properties of an object using the useBean directive.
- Build an application in JSP that redirects to another page.
Programs with Medium Difficulty Level in JSP Practice Exercise
- Write a program in JSP that displays a hits counter.
- Create an application to display HTTP header information using JSP.
- Write a program to display a digital clock using JSP.
- Develop an application in JSP to create a registration form and display the values entered by the user in another page.
- Create a JSP filter that prints the IP address.
- Write a program in JSP to display multiple filters.
- Develop an application in JSP to create, read, and delete cookies in JSP.
- Write a program in JSP to display session information.
- Create an application in JSP to upload a file.
- Write a program in JSP to display, insert, update, and delete data from a database table.
- Develop an application in JSP to create a custom tag.