This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
If you're interested in moving away from scriptlets (and I applaud you for doing so), this probably isn't the best approach. Building up HTML markup in a Java class is as messy if not messier than scriptlets.
Instead, find a good tutorial on the Model View Controller (MVC) pattern.
In a nutshell: Write your business logic in plain old Java classes (Model). Write a servlet that handles web requests. (Controller) Have the controller instanciate any model classes and call their methods. Have the model classes return the data in the form of JavaBeans and bind them to request (or, if need be, session or context) scope. Forward to a JSP (View) and use JSTL and EL for formatting the data.
[ August 31, 2007: Message edited by: Tom Madson ]
[Moderator edit: removed discussion of approach taken by other posters. If you have issues to air, the JavaRanch discussion forum is the place to do so. Thanks.] [ August 31, 2007: Message edited by: Bear Bibeault ]