O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

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

Displaying the Main Menu

The MenuAction class, as shown below, is used to prepare the main menu for the user. This involves checking to determine whether or not the user has logged into the movie store and has a cart. Two flags are set to indicate whether or not these conditions are true. These flags are placed in the session object where they are retrieved by the menu page to determine how to display the menu.

The MenuAction Class
 package examples.struts; import java.io.IOException; import java.util.Hashtable; import java.util.Locale; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; ...

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