Scripting Elements

Scripting elements let you add small pieces of code to a JSP page, such as an if statement to generate different HTML depending on some condition. Like actions, they are executed when the page is requested. You should use scripting elements with extreme care; if you embed too much code in your JSP pages you will end up with an application that’s very hard to maintain. In addition, simple code syntax errors in scripting elements often lead to error messages that are much harder to interpret than error messages for syntax errors in action elements.

Get JavaServer Pages Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.