ABC Company has an old web application built using Servlets/JSP and in-house MVC framework. You are asked for expert advice on improving the quality of code as ABC Company has to spend lot of money time and again even for small changes in the application. Looking at the code, you have observed that lot of java code has been used in JSP and has been duplicated in multiple instances.
Which of the following technologies would you recommend to use?
Choose one answer. a. AJAX
b. Tag Libraries
c. Expression Language
d. Rewrite whole application using JSF.
The answer provided is c. But I would think b is more appropriate since it will help modularize the code and that is the easiest way to solve the problem ABC is facing
Any comments on why c is appropriate??
You are developing an MVC Framework with servlet as the controller and JSP as the view. You want this application to be integrated to monitoring tools like Tivoli, so that whenever an interfacing system is down (database, EJB Services, JMS providers), you would like to invoke the monitoring tool through a proprietary API to alert application maintainence team. The user should be able to see the message.
Where would you put this logic?
Choose one answer.
c. Servlet Filter
I would say a or c both will work out. c might be more elegant since you can have one filter catching exceptions , one filter per system resource etc etc
But a is given as correct choice
You are designing a travel booking application for employees of your organization. Through this application, employees can book online for various road, rail and air transport. Once the customer confirms the booking, your application will make calls to these transport companies through web services.
Which of the following would be useful for you to implement this?
Choose one answer.
a. Stateless Session Beans
c. Stateful Session Beans
d. Enterprise Service Bus.
Option b is given as answer . Rational : Once the user makes selections, web service invocations can be done from the web layer. There is no need to use session beans as there are no requirements for transactions/scalability.
But in booking is transaction not mandatory , I mean should it even be specified ? I thought it is self understood that any booking process should have transactions.
So I thought c or even d ( communicating across various booking source )