2

what is the advantage of using EL over scriptlets in JSP.EL is said to be scriptfree language

hop
  • 2,518
  • 11
  • 40
  • 56
giri
  • 26,773
  • 63
  • 143
  • 176
  • A really good answer has been provided there: http://stackoverflow.com/questions/3177733/how-to-avoid-java-code-in-jsp-files (http://stackoverflow.com/tags/el/info is also a good reference) – koppor Mar 30 '12 at 13:08

2 Answers2

5

EL keeps the JSP free from errorprone raw Java code and forces you to write the JSP according the MVC ideology. Anything which isn't possible with EL (or taglibs like JSTL) would then technically and semantically belong in a real Java class. That's the most major advantage.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
4

The advantages of using EL are:

  • readability
  • conceptual clarity - jsp is not meant to include any business logic, only presentation
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140