Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Head First Servlets & JSP book - JSTL and Javabean Question

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, good day everyone, when should we use JSTL rather javabean ? thank you !
 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSTL allows you to program your JSP pages using tags, rather than the scriptlet code. You can use bean in JSTL.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition, JSTL with EL simplies the coding needed for retriving objects (usually JavaBeans) from the scope, and display the content to the browser.

Nick
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is EL ? is it another user define tag for jsp page ?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EL is Expression Language, which uses to simplify the access of JSP scope variable.

For example, in the past, if you need access a variable, you need to:


But with EL, it can be simplified as:


HTH

Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic