Sams Teach Yourself J2EE™ in 21 Days
by Martin Bond, Dan Haywood, Debbie Law, Andy Longshaw, Peter Roxburgh
Comparing JSP with Servlets
As you have seen JSPs have several advantages over servlets. They
Are quicker to write and develop
Focus on the page layout and delegate Java logic to supporting JavaBeans and custom tags (as will be discussed on Day 14)
Differentiate the Web page presentation (HTML) from the underlying logic (Java)
Can be written by non-Java–aware developers provided suitable supporting beans and tag libraries are available
Support a standard error reporting mechanism using the error page directive
However, JSPs do have some downsides:
Error identification and correction is complicated by the translate and compile lifecycle.
Large volumes of embedded Java scriptlets can reduce the maintainability of the page.
In general, you should use ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access