Java

JSP Practice Exercise

Programmingempire

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.

  1. Write a program in JSP to display “Hello, World!”.
  2. Find the sum of two numbers using JSP.
  3. Write a program in JSP to display the given text in a paragraph in different font sizes using a loop.
  4. Create a dynamic web application in JSP to find the grade according to the marks entered by the user using the switch statement.
  5. Build an application in JSP to calculate factorial of a number using recursion.
  6. Write a program to create a JSP method that accepts a number and returns its double.
  7. Use Page directive in JSP to display the current date.
  8. Create a summation method in JSP that accepts an array and display the sum of its element.
  9. 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.
  10. Develop an application to demonstrate the include directive in JSP to display the current date from another JSP page.
  11. Write a program in JSP to display the properties of an object using the useBean directive.
  12. Build an application in JSP that redirects to another page.

Programs with Medium Difficulty Level in JSP Practice Exercise

  1. Write a program in JSP that displays a hits counter.
  2. Create an application to display HTTP header information using JSP.
  3. Write a program to display a digital clock using JSP.
  4. Develop an application in JSP to create a registration form and display the values entered by the user in another page.
  5. Create a JSP filter that prints the IP address.
  6. Write a program in JSP to display multiple filters.
  7. Develop an application in JSP to create, read, and delete cookies in JSP.
  8. Write a program in JSP to display session information.
  9. Create an application in JSP to upload a file.
  10. Write a program in JSP to display, insert, update, and delete data from a database table.
  11. Develop an application in JSP to create a custom tag.

Further Reading

Understanding Enterprise Java Beans

Java Practice Exercise

Princites

You may also like...