8.4. Getting Favorite Team Information from Struts

Our MainPage form is rendered as HTML, rather than a JSP, just to show that it is possible to mix and match. By doing so, we eliminate the possibility of using any tag libraries, so we must revert to “vanilla” HTML syntax.

Listing 8.16. MainPage.html
<HTML>
<HEAD>
<TITLE>NFL Standings Main Page</TITLE>
</HEAD>

<BODY>
<H1>Select a Function</H1>
<a href="/nfl-struts/struts/FavoriteTeam">
        Show Favorite Team Status</a><br>
<a href="/nfl-struts/struts/LoadTeamlist">
        Change User Preference Settings</a><br>
</BODY>
</HTML>

The FavoriteTeamAction class is a little different than the Actions we've seen so far. Here, we are preparing output, rather than processing input. We could attach several individual ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.