Main Content

Using JSPs, Tag Libraries, Java Beans, Tomcat in one short example

Archive - Originally posted on "The Horse's Mouth" - 2009-12-04 18:10:35 - Graham Ellis

I've just completed a Java Bootcamp Course. On Tuesday morning, I had newcomers to Java (but with prior programming experience) and by the end of Friday afternoon, they had written some good exercises, using the fundamentals of Java, including Utility classes, and they had also worked with and understood basic Servets, JSPs and standard tag library applications.

Here's the last exercise from one delegates (shared, with permission) in which I asked the course to write a form to read in a temperature in one unit, convert to another unit via JSP (but keeping the model - i.e. business logic in a separate Java Bean class) and output the result. That's three files even for a simple application but it is easily extensible!


First file - the HTML form - [see here]

Second file - the JSP / tag library page that gives the view - [see here]

Third and final file - the class that contains the business logic (i.e. the model) - [see here]


That was the last Java course this year - but the Java Bootcamp is already scheduled for five dates nest year, as is the extended Learning to Program in Java for delegates who have not programmed before. If you're not programming in Java, but you will be deploying Java applications on an Apache Tomcat server, have a look at our Deploying Apache and Tomcat course ... six dates already set for 2010, starting on 7th January.