I read about JSP in a book many years ago, and recently decided to learn on my own. I now know how to use JSP scriptlets, expressions, and declarations
<%! String str = "Hello World" %>
<%= str.length() %>
<% str=str.substring(0,5) %>
But I have read in many places (on this site and elsewhere) that I shouldn't use scriptlets. This is one such question: Eclipse using Classes in JSP
My questions are:
- What is wrong with scriptlets?
- What do I use instead?
Thanks in advance for any help!
EDIT:
I do not use Servlets, but embed my JSP code onto an HTML page. UI designers with no knowledge of Java can easily modify my page. Basically I use JSP as a front end for displaying from a database and making updates to it such as when a user makes an order.