Struts Tags vs. JSTL
Asked Answered
T

3

9

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.

Tier answered 31/7, 2009 at 19:7 Comment(0)
Y
5

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
Yb answered 3/8, 2010 at 13:29 Comment(1)
...which would render your app a bit more portable.Palmore
K
3

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.

Kissinger answered 8/5, 2020 at 13:50 Comment(0)
A
0

It depends on your usage of custom tags - some tags, like those that create an option dropdown list, are much easier to use and read than the equivalent c:foreach loop tag. However, JSTL is common across many apps, so if you stopped using the struts custom tags in a different webapp, you'd probably still have access to the JSTL.

Amelita answered 31/7, 2009 at 19:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.