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

User Registration

Before the user registration page is called, the RegistrationAction class is called by the servlet controller. The responsibility of this class is to essentially assure that a user bean object is present in the user's session. If a user bean object is not present, it creates one, assigning it a user ID value of zero, and then allows the user to continue.

RegistrationAction.java
 package examples.struts; import java.io.IOException; import java.util.Hashtable; import java.util.Vector; import java.util.Collection; 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