You can use container based security.
http://jakarta.apache.org/struts/userGuide/preface.html#jaas

-----Original Message-----
From: Jason Vinson [mailto:[EMAIL PROTECTED]
Sent: 26 February, 2003 16:38
To: Struts Users Mailing List
Subject: security question #2


I am using the below code to check for the presence of session attributes
for security.  Are there any issues I may be overlooking by doing it this
way?

TIA,
Jason

//####################################################
// Default spgAction class
//####################################################

package spg.logic;

import com.clarify.cbo.*;
import org.apache.struts.action.*;
import org.apache.struts.actions.*;
import javax.servlet.http.*;

public class spgAction extends Action {

    public ActionForward execute (ActionMapping mapping,
        ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

    HttpSession session = request.getSession();
    Session ClfySession = (Session)session.getAttribute("ClfySession");
    com.clarify.cbo.FormContext ClfyFormContext_S =
(com.clarify.cbo.FormContext) session.getAttribute("ClfyFormContext_S");

    if ( ClfySession == null || ClfyFormContext_S == null) {
        return(mapping.findForward("login"));
    } else

    return super.execute(mapping, form, request, response);
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

______________________________________________

Disclaimer and confidentiality note


Everything in this e-mail and any attachments relating to the official business of 
Standard Bank Group Limited is proprietary to the company. It is confidential, legally 
privileged and protected by law. Standard Bank does not own and endorse any other 
content. 
Views and opinions are those of the sender unless clearly stated as being that of 
Standard Bank. 

The person addressed in the e-mail is the sole authorised recipient. Please notify the 
sender 
immediately if it has unintentionally reached you and do not read, disclose or use the 
content
in any way. 

Standard Bank can not assure that the integrity of this communication has been 
maintained nor 
that it is free of errors, virus, interception or interference.

______________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to