Re: redirect command

2009-11-30 Thread Chris Pratt
As I mentioned before, look at the Interceptor interface that is part of Struts 2. It will allow you to get control of every request to check whether the user is logged in and do the right thing if they are. You can add parameters to your actions in the struts.xml that can help control the action

Re: redirect command

2009-11-30 Thread Nguyen Xuan Son
dear chris I think it's ok if we redirect by using the struts.xml file but I really confuse in so many other cases for example when the user is login into the system already but still try to enter to login.jsp page in that case i think the system should be able to detect that the user is holding th

Re: redirect command

2009-11-29 Thread Chris Pratt
if you are returning "success" (or SUCCESS), then you need to define login.jsp (or, since it's the default you could just define login.jsp). What you defined will only work if you return "input" (or INPUT) from your execute or if you action is returning from the input() method. (*Chris*) On Sun,

Re: redirect command

2009-11-29 Thread Nguyen Xuan Son
Dear I've tried login.jsp but nothing happen, it seems that even if i fall into the irrelevant situation it doesnt not redirect to the login.jsp page thank you very much 2009/11/30 Saeed Iqbal > type="redirect" > > On Monday, November 30, 2009, Saeed Iqbal wrote: > > Just have redirect near

Re: redirect command

2009-11-29 Thread Saeed Iqbal
type="redirect" On Monday, November 30, 2009, Saeed Iqbal wrote: > Just have redirect near result name="" > > On Monday, November 30, 2009, Nguyen Xuan Son wrote: >> dear all >> here i've the detail of struts file >> >> sessionChk.jsp >> >> >> and in the SessionCheckAction.java file i have >>

Re: redirect command

2009-11-29 Thread Saeed Iqbal
Just have redirect near result name="" On Monday, November 30, 2009, Nguyen Xuan Son wrote: > dear all > here i've the detail of struts file > > sessionChk.jsp > > > and in the SessionCheckAction.java file i have > public class SessionCheckAction extends ActionSupport{ > public String execute()

redirect command

2009-11-29 Thread Nguyen Xuan Son
dear all here i've the detail of struts file sessionChk.jsp 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

Re: redirect command

2009-11-26 Thread Saeed Iqbal
In Java Action Bean you would just have to return a specific string that struts.xml uses. On Thu, Nov 26, 2009 at 7:53 PM, Saeed Iqbal wrote: > Instead of programmatically doing it, you can just specify redirect in your > struts.xml file to the place you want. > > On Thu, Nov 26, 2009 at 7:49 PM

Re: redirect command

2009-11-26 Thread Saeed Iqbal
Instead of programmatically doing it, you can just specify redirect in your struts.xml file to the place you want. On Thu, Nov 26, 2009 at 7:49 PM, Nguyen Xuan Son wrote: > dear all > im trying to deny any users whose session is not exist, access to my > webpage > thus im using the source code >

redirect command

2009-11-26 Thread Nguyen Xuan Son
dear all im trying to deny any users whose session is not exist, access to my webpage thus im using the source code Map ses = ActionContext.getContext().getSession(); if((ses.get("context").toString()=="")&&(ses.get("role").toString()!="admin")){ //redirect to login page } However, i dont know whi