REVIEW - Java Server Pages


Title:

Java Server Pages

Author:

Hans Bergsten

ISBN:

156592746

Publisher:

O'Reilly ()

Pages:

552pp

Reviewer:

Ian Bolland

Reviewed:

August 2001

Rating:

★★☆☆☆


Java Server Pages are Sun's latest method for generating dynamic web content. This task requires two separate sets of skills; the graphic design skills needed to generate attractive HTML and the programming skills needed to access the dynamic data. These skills are rarely combined in one person and so the task requires collaboration between a page designer and a programmer. Typically the page designer produces an initial layout in static HTML and passes it to the programmer, who splits it up and embeds the fragments into his CGI program or Java Servlet. Whenever the page designer subsequently wants to tweak the layout either he has to go back to the programmer, or else become a programmer himself.

JSP overcomes this problem by allowing the program logic to be embedded in the HTML page. The page can contain arbitrary fragments of Java code, known as scriptlets, within special tags. This code can perform data access and formatting, data validation and any other tasks required by the application. When the page is requested the JSP server converts it into a servlet, inserting print statements for all the HTML. It then compiles the servlet, executes it and returns its output to the client.

This provides a much better separation between the page designer and the programmer. Once the programmer has written the initial logic in the scriptlets, the page designer can tweak the surrounding HTML without needing any further assistance. A more advanced facility of JSP allows the programmer to package up standard components and make them available to the designer in the form of custom tags: this may allow the designer to create simple web applications himself.

This book provides a fairly comprehensive introduction to JSP. It does a good job of explaining the principles behind JSP, the user-visible syntax and what goes on in the background to make it all happen. It contains lots of examples and explains what you have to do to run them, using the Apache Tomcat server. It doesn't attempt to gloss over the problems with JSP; e.g. it devotes an entire chapter to debugging the generated servlets.

The problem I have with this book is that it attempts to address itself both to the page designer and to the programmer and so doesn't really meet the needs of either group. To fully understand this book you need a fair knowledge of Java, HTML, HTTP, CGI forms processing, servlets, JavaBeans, JDBC and EJB. In my opinion, anyone with this level of knowledge is in fact a programmer, regardless of what his or her actual job title may be. The author does attempt to provide simplified explanations for the non-programmer, but I don't think that these explanations are really adequate.

In summary, this is not a bad book, but would have been much better had it been written specifically for programmers.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.