O'Reilly logo

Struts Kick Start by Kevin Bedell, James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Model Component (HelloModel.java)

In the previous section, you saw how the Action class interacted with the Model component HelloModel.java. In Listing 3.5, let’s take a look at the HelloModel.java file itself.

Listing 3.5. The Struts Model Component Hello World! (HelloModel.java)
 package ch03.hello; /** * <p>This is a Model object which simply contains the name of the person we * want to say "Hello!" to.<p> * * In a more advanced application, this Model component might update * a persistent store with the person name, use it in an argument in a web * service call, or send it to a remote system for processing. * * @author Kevin Bedell */ public class HelloModel { // --------------------------------------------------- Instance Variables ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required