Reputation: 39
it was on my exam paper, and i don't know when is the proper timing to use each expression. they can calculate numbers, and put data into variables. so I couldn't catch certain difference between there.. can someone know that? let me know that.. I'm confusing :/
"<%=%>"
${}
Upvotes: 2
Views: 1553
Reputation: 706
Both serves the same purpose in the end, i.e writing java code in JSP, but there are some caveats
${}
is introduced to separate the View from the Business Logic to adhere with MVC pattern.that's the reason
Where possible, avoid JSP scriptlets whenever tag libraries(JSTL) provide equivalent functionality.
Upvotes: 3