O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Movies Listing Servlet

The movies are listed using the MoviesChooser servlet shown below. This servlet reads values from the session object to get the name of the SQL query to execute and the name of the XSLT template to use. These values relate to the names of init parameters in the web.xml file for the servlet context where the movie store application is deployed. We retrieve the session values and the corresponding init parameter values in the doGet method, since the shared servlet code may potentially have different callers from different sessions.

Within the doGet method, the query is executed (using the getQueryResults method) and the results are returned as an XML document. An XML parser and transformer are then created using the XSLT ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required