-1

I'm creating jsp/servlet project, and jstl functionality is not enough for filling template(i need to use iterator and do some checks). I see only 2 options: use scripltes (what i read is bad practise) or process html as string and c:out with jstl (what i'm currently doing). Is that ok and is there a better way to do this?

1
  • The better way is not to touch servlets at all. Spring MVC (along with other frameworks) exists specifically to handle all of this for you. Commented May 20, 2020 at 14:27

1 Answer 1

1

Second one is good for process HTML, Since jsp is used to view purpose mostly, we can do code in this using scriplets as well, but it is not recommended because each time page will be rendered, jsp will convert into class file and rendered.

If we will process this line in Java side and only use with via <c:out>. Page rendering will be fast, (will not compile the scriplets code each time, because we don't have scriplet code)

Not the answer you're looking for? Browse other questions tagged or ask your own question.