O'Reilly logo

Head First Servlets and JSP, 2nd Edition by Bert Bates, Bryan Basham, Kathy Sierra

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

Scriptlets considered harmful?

Is it true? Could there be a downside to putting all this Java into your JSP? After all, isn’t that the whole frickin’ POINT to a JSP? So that you write your Java in what is essentially an HTML page as opposed to writing HTML in a Java class?

Some people believe (OK, technically a lot of people including the JSP and Servlet spec teams) that it’s bad practice to put all this Java into your JSP.

Why? Imagine you’ve been hired to build a big web site. Your team includes a small handful of back-end Java programmers, and a huge group of “web designers”—graphic artists and page creators who use Dreamweaver and Photoshop to build fabulous-looking web pages. These are not programmers (well, except for the ones who still think HTML is “coding”).

image with no caption

Aspiring actors working as web designers while waiting for their big showbiz break.

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