Link to home
Start Free TrialLog in
Avatar of sanjana tyagi
sanjana tyagi

asked on

tags in jsp equivalent to cold fusion

I am trying to convert some coldfusion code to jsp and there are some tags like cfargument,cf:loop,cf:return,cf:location.. can anybody tell me what to use in place of these tags in jsp?
Avatar of _agx_
_agx_
Flag of United States of America image

Disclaimer: I'm more familiar with CF than JSP, but from what I've read JSTL syntax is recommended over the discouraged scriptlet tags.  If you look at the examples in the 1st link:

CFLoop is equivalent to <c:forEach>
https://www.tutorialspoint.com/jsp/jstl_core_foreach_tag.htm

CFArgument is used with custom CFFunctions. Probably most similar to Attributes of Tag Files / Custom Tag.
https://stackoverflow.com/a/27226768/8895292

CFLocation is used to redirect to another URL. Equivalent to <c:redirect >
https://www.tutorialspoint.com/jsp/jstl_core_redirect_tag.htm

AFAIK there is no return statement in JSTL. Depending on the code, it's not always necessary.
https://stackoverflow.com/a/16091176
Avatar of sanjana tyagi
sanjana tyagi

ASKER

thanks @ _agx_
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.