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

How to Use Struts with a Web Service

The title of this section is a bit misleading. It seems to imply that there might be a single best way of using Struts with a Web Service. This isn’t the case. There are many options that could make sense based on your specific environment and application. However, that being said, this chapter provides a specific recommended approach.

This recommended approach is illustrated in the sample application presented in the next section. But first, here are some key points to the design:

  • The Web Service is called from the Action class. The need to manage Exceptions and to coordinate different views based on the Web Service response makes the Action class the appropriate place for calling the Web Service.

  • A value ...

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