Sunday, 22 January 2017

java - about using scriplets in JSP

The advice you got on scriptlets causing single threading for your site is only true if the code you put in the scriptlet causes that to happen, JSTL, Struts, etc. all generate java code that looks just like the code your JSP with scriptlets generates.


That being said, using scriptlets is considered poor practice because it leads to convoluted code. Try using JSTL use beans and put your java logic in them instead. Your JSP will look much nicer and be easier to maintain.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...