com.ora.jsp.servlets
Class StoreMsgAction

java.lang.Object
  |
  +--com.ora.jsp.servlets.StoreMsgAction
All Implemented Interfaces:
Action

public class StoreMsgAction
extends java.lang.Object
implements Action

This class stores a new message in the Project Billboard application.

Version:
1.0
Author:
Hans Bergsten, Gefion software

Field Summary
private  ActionUtils utils
           
 
Constructor Summary
StoreMsgAction()
           
 
Method Summary
 void perform(javax.servlet.http.HttpServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Creates a new NewsItemBean and sets its properties based on the "category" and "msg" request parameters, plus the firstName and lastName properties of the authenticated user (an EmployeeBean accessible as the "validUser" session attribute).
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

utils

private ActionUtils utils
Constructor Detail

StoreMsgAction

public StoreMsgAction()
Method Detail

perform

public void perform(javax.servlet.http.HttpServlet servlet,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.io.IOException,
                    javax.servlet.ServletException
Creates a new NewsItemBean and sets its properties based on the "category" and "msg" request parameters, plus the firstName and lastName properties of the authenticated user (an EmployeeBean accessible as the "validUser" session attribute). The NewItemBean is then added to the NewsBean. This action is only performed for POST request. Before returning, the client is redirected to the main page, where the new message is displayed.
Specified by:
perform in interface Action