Just have redirect near result name="" On Monday, November 30, 2009, Nguyen Xuan Son <yama...@gmail.com> wrote: > dear all > here i've the detail of struts file > <action name="SessionCheck" class="com.baibai.action.SessionCheckAction"> > <result name="input">sessionChk.jsp</result> > </action> > > and in the SessionCheckAction.java file i have > public class SessionCheckAction extends ActionSupport{ > public String execute() throws Exception { > Map ses = ActionContext.getContext().getSession(); > // check where the the session is null or empty string > if(StringUtils.isNotEmpty((String) > ses.get("context"))&&StringUtils.isNotEmpty((String) ses.get("role"))){ > if(ses.get("context").toString().isEmpty()||!ses.get("role").toString().equals("admin")){ > // the user is loginned as an administrator > } > } else { > // the user have not been loggined in or user's role is not an administrator > } > return SUCCESS; > } > } > in both case, i want to redirect to login.jsp page > i've tried with the struts.xml file but failed > do you have any suggestion, > thank you very much > > -- > ======================================================================= > Ritsumeikan University, Asia JinZai Project > Master of Information Science > Nguyen Xuan Son > > Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu > Rien, Room 103 > Tel/Fax : 81-(0)90-3976 2246 > Email : nr000...@ed.ritsumei.ac.jp > Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp > ======================================================================= >
-- Saeed Iqbal Independant Consultant (Freelance) Struts - J2EE - Application Architect / Developer --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org