Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Struts Tags vs. JSTL

Tags:

jsp

jstl

struts

Struts has a number of helpful custom JSP tags, and Struts-EL adds much needed EL support. I'm looking for thoughts on relative merits of using Struts/Strut-EL tags where available vs. just using JSTL tags.

like image 492
Edward Shtern Avatar asked Jul 31 '09 19:07

Edward Shtern


2 Answers

Simple:

  • Struts Tags are only available to projects that use Struts
  • JSTL tags can be used anywhere and can even co-operate with other frameworks such as Spring or JSF
like image 63
kazanaki Avatar answered Jan 14 '23 14:01

kazanaki


Struts tags are simply used with in struts framework, but you can not use in others. JSTL is totally different, we can use this in any other rendering page. Mostly some time we want to make custom tags as per out business logic , we can achieve this by JSTL tags: EX :

Simple

<c:set var="delUrl" value="CustInfo.do?type=6&acId=0"></c:set>

Custom

<ab-c:set var="delUrl" value="CustInfo.do?type=6&acId=0"></ab-c:set>

we can perform some logic(URL encryption ) on value as per requirement.

like image 27
Sachin Kumar Avatar answered Jan 14 '23 13:01

Sachin Kumar