java - Exact difference and relation between JSTL and Expression Language -


after reading q&a how avoid java code in jsp files? stopped coding scriptlets.

so started reading jstl , got doubt found jstl have relation el.

but not getting exact relation between them.

here got code here

 <c:set var="test" value="jstl core tags"></c:set>  <c:out value="${test}"></c:out> 

i know <c:set jsp tag , ${test} expression language ..

my confusions

  1. won't working jstl alone work? need support of el ? if not needed, how in above case?

  2. how use expression language without jstl tags?

the el, initially, has been designed used inside attributes of jstl tags, , other custom tag might want use or write yourself.

a later version of jsp spec has allowed using el directly inside jsps, doesn't mean jstl isn't useful anymore. thing can el directly in jsp write value response example

${user.id} 

which write id of user bean. if want tests, loops, html escaping, urls, date number formatting, etc., still need use jstl.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -