Skip to content

Indira Gandhi National Open University

Master of Computer Applications (MCA)

MCSL-222: Object Oriented Analysis and Design and Web Technologies Lab

Section 2: Web Technologies

Semester
II
Sessions
10
Exercises
46
Source
IGNOU lab manual, list of lab exercises

Instructions

  1. Use Apache NetBeans IDE or Eclipse IDE with JDK 17 or later and Apache Tomcat 10.
  2. The database named IGNOU with a Student table created in Session 1, Exercise 5 is reused in later sessions; keep its schema in your record.
  3. Sessions 3 onward extend one Maven project. Keep the project after every session.
  4. Make and state any assumptions the exercise leaves open.

Session 1: Basics of Servlet

Q1. Write a Servlet Programme to print the current date and time along with the timestamp.

Q2. Create an HTML form with the input of student information using HTTP Protocol and method, then display the input information using Servlet.

Q3. Write a servlet program to capture client IPs and display it.

Q4. Write a servlet program for session management using HTTP Session along with tracking and also use a cookie for session tracking.

Q5. Write a CRUD (Create/Save, Read, Edit/Update, Delete) application using servlet. Create a Database named IGNOU, create a table named Student which must capture the student information (basics, contact, enrollment details along with courses). Make necessary assumptions required.

Session 2: JSP

Q6. Write JSP Programme to print current date and time along with timestamp, implement auto-refresh of a page.

Q7. Create a JSP page and implement a Scripting Tag, Expression tag and Declaration tag.

Q8. Import JSTL library in JSP Page and use its following tags:

  1. out
  2. if
  3. forEach
  4. choice, when and otherwise
  5. url and redirect

Q9. Create a JSP Page for database connectivity using JDBC and show the students details from the database created during exercise no 5 in session 1.

Q10. Write a JSP application using following Action Elements

  1. jsp:forward
  2. jsp:include
  3. set and getProperty
  4. jsp:useBean

Q11. Write a JSP program using the following implicit objects with an example:

  1. out
  2. request
  3. response
  4. session
  5. pageContext
  6. exception

Q12. Create a JSP Project implementing all the above (Session 1 and Session 2) concepts. Login Form, CRUD operation of Student details, Session Management with exception handling using Servlet and JSP. Make necessary assumptions required.

Session 3: Maven and frameworks for J2EE

Q13. Create a Maven-based project using Spring Initializr.

Q14. Create a Maven-based J2EE application for Spring MVC.

Q15. Create a Maven-based J2EE application for Hibernate and JPA. Use the same database created in Exercise no. 5 of Session 1.

Q16. Define a new implementation of Teacher Interface for his/her favourite Course in Spring using Inversion of Control and retrieving the information from the new teacher implementation.

Session 4: Dependency injection and controllers

Q17. Write a class and implement it using dependency injection.

Q18. Write the service interface with the getRandom() method, define 3 courses in an array, and inject using dependency injection into the teacher Interface (exercise no 4 in session 3). Test the application and verify the retrieving of random courses.

Q19. Write a programme using Spring Framework to create a controller and display response in view using @GetMapping() annotation.

Q20. Create a Form to capture Student Admission information (make usual assumptions about the attributes) using Spring Form tags (must use Text, textarea, dropdown, date picker, true/false and checkbox) and write a controller using @PostMapping() to display the form information.

Session 5: Form validation, Bootstrap and CSS

Q21. Apply the client validation in the form created in the above exercise 4 of session 4, along with server-side validation.

Q22. Write a programme to bind form objects with entity bean in Spring MVC.

Q23. Configure Bootstrap in Spring MVC and use default styling classes in the form and view created in the above exercises.

Q24. Apply custom Styling to your pages in Spring MVC.

Session 6: Hibernate and JPA

Q25. Create a database for the student admission lifecycle and configure Hibernate and JPA with the Spring MVC Project along with all table entities.

Q26. Retrieve Student information using Hibernate and printing the value in the console.

Q27. Create CRUD (Create/Save, Read/Fetch, Edit/Update, Delete) using Spring MVC and Hibernation.

Q28. Apply batch update for student’s admission approval using Spring MVC and Hibernate.

Session 7: Spring Boot and REST controllers

Q29. Create a Spring Boot application using Spring Initializer. Add the following dependencies manually:

  1. Spring MVC
  2. Hibernate
  3. JPA
  4. Thymeleaf
  5. DevTool
  6. Actuator
  7. MySQL/MSSQL/Oracle/MongoDB (as per your choice) driver.

Q30. Configure Database settings through the property file in Spring Boot.

Q31. Create JPA Repositories for all entities used in the Student Admission lifecycle.

Q32. Create Rest Controller to fetch Student Information using JPA Repository; the response should display in JSON format.

Session 8: REST API, Spring Security and Actuator

Q33. Add actuator dependency in Spring boot and Test Actuator (all available Endpoints).

Q34. Create REST API for CRUD operation using Spring Boot and Hibernate/JPA using annotation.

Q35. Create a REST API for CRUD operation using Spring Boot and Hibernate/JPA using XML configuration.

Q36. Add Spring Security dependency in the existing spring boot application created in Exercise 2 of Session 8 and configure it as the default login.

Session 9: Spring Security

Q37. Create a User table into the database and bind the user entity with Spring Security for Login.

Q38. Create a Custom Login Page in HTML and authenticate using Spring Security in Spring Boot.

Q39. Implement logout functionality in Spring Security.

Q40. Create a User registration form and validate the form. Once information is validated and saved, write functionality to auto-login using Spring Security.

Session 10: Bootstrap, role based authentication and CSRF

Q41. Add Bootstrap styling in the Login and registration page in the above exercises in session 9.

Q42. Create a Role Table in the database and configure it with Spring Boot, Security and Hibernate.

Q43. Write code for role-based authentication using Spring Security.

Q44. Display current logged in User details on the dashboard along with client IP, data time and user’s current role.

Q45. Add CSRF functionality in the authentication.

Q46. Restrict role-based access to views in Spring Boot Security.

Type to search…

↑↓ navigate↵ selectEsc close