Methods Summary |
---|
protected void | clearSession(javax.servlet.http.HttpServletRequest request)
//~ Methods ----------------------------------------------------------------
HttpSession session = request.getSession( );
session.removeAttribute( USERID_KEY );
session.removeAttribute( USERNAME_KEY );
Cart cart = getCart( false, request );
if ( cart != null )
{
session.removeAttribute( CART_KEY );
cart.remove( );
}
|
protected abstract org.apache.struts.action.ActionForward | doExecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
|
public org.apache.struts.action.ActionForward | execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
_log.info( "execute()" );
return doExecute( mapping, form, request, response );
|
public xpetstore.services.cart.ejb.Cart | getCart(boolean create, javax.servlet.http.HttpServletRequest request)
HttpSession session = request.getSession( );
Cart cart = ( Cart ) session.getAttribute( CART_KEY );
if ( ( cart == null ) && create )
{
cart = (Cart)new InitialContext().lookup("ejb/Cart");
session.setAttribute( CART_KEY, cart );
}
return cart;
|
public xpetstore.services.cart.ejb.Cart | getCart(javax.servlet.http.HttpServletRequest request)
return getCart( true, request );
|
public xpetstore.services.petstore.ejb.Petstore | getPetstore()
return (Petstore)new InitialContext().lookup("ejb/Petstore");
|
public java.lang.String | getString(java.lang.String key)
try
{
return ResourceBundle.getBundle( BUNDLE_NAME ).getString( key );
}
catch ( Exception e )
{
return "???" + key + "???";
}
|
protected void | initSession(xpetstore.domain.customer.ejb.Customer customer, javax.servlet.http.HttpServletRequest request)
HttpSession session = request.getSession( );
session.setAttribute( USERID_KEY, customer.getUserId( ) );
session.setAttribute( USERNAME_KEY, customer.getFirstname( ) + " " + customer.getLastname( ) );
|