Multiple choice technology web technology

ABC company has a very old web application that was built on Servlets, JSP and a simple proprietary MVC framework which they must use. This application is mostly used for reporting purposes and retrieves data from DB2 through JDBC. They are planning to enhance the functionality of the application and also deploy on a Java EE application server. They approached you for suggestions to improve the application code. Which of the following would not be a valid recommendation (best-fit)? Choose one answer.

  1. Refactor the common scriptlet code into tag libraries wherever possible

  2. Create a common look & feel using templates, CSS files.

  3. Use Entities

  4. Use Expression Language

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The application uses JDBC directly with no persistence layer, so introducing JPA Entities would require significant architectural changes (new EntityManager, entity mappings, refactoring all JDBC code). This contradicts the 'improve with minimal costs' requirement. The other options are valid, low-risk improvements: tag libraries and EL reduce scriptlets, templates create consistent UI.

AI explanation

For a legacy Servlet/JSP reporting app pulling read-only data from DB2 via JDBC, adopting Entity Beans is not a good fit — Entity Beans (CMP/BMP) add heavy container-managed persistence overhead meant for transactional, object-relational domain models with complex business logic, not simple read-mostly reporting queries. A lighter DAO/JDBC or Session Bean facade approach fits better. The other options are all sound, low-risk modernization steps: extracting scriptlets into tag libraries and using Expression Language reduce scriptlet clutter per JSP best practices, and shared templates/CSS improve consistent look and feel — none require the architectural weight of Entities.