I have overriden the processPreprocess method of the
TilesRequestProcess,
        but it dosen't work:

        In Struts-config.xml:

        <forward name="welcome" path="/welcome.do" />
        <forward name="login" path="/login.do" />

        <action path="/welcome"
                    type="org.apache.struts.actions.ForwardAction"
                parameter="site.login.page"
                    scope="request"
                validate="false"/>
        
        <action path="/login"
                    name="LoginForm"
                validate="true"
        
type="xms.clients.webappli.common.struts.controller.actions.LoginAction"
                input="site.login.page"
                    scope="request">
                <forward name="success" path="site.atm.calls.status.page" />
        </action>       

        In MyRequestProcessor calss:

        protected boolean processPreprocess(HttpServletRequest request,
HttpServletResponse response)
        {       
          HttpSession session = request.getSession();

          try{
     
            String path = processPath(request, response);
                if ( !path.equals((String) "/login") )
                {
        
                   User userInfo =
(User)session.getAttribute(Constants.USER_KEY);

                   if ( userInfo == null ||
                      (userInfo != null && userInfo.getSessionId() == 0) )
                   {
                         processForwardConfig(request,
response,appConfig.findForwardConfig("login"));
                   }
                }
            }
   
            catch (ServletException ex)
            {
            }
            catch (IOException ex)
            {
            }
            return true;
        }

        If userInfo == null, the call of the processForwardConfig works and
then we pass again in the processPreprocess
        and return true.
        Then the following error javax.servlet.ServletException: Path
site.login.page does not start with a "/" character
        is displayed but the login page is displayed.
        But if  userInfo != null then the return true is called but the
login page is not displayed.
        And the error javax.servlet.ServletException: Path site.login.page
does not start with a "/" character is displayed.
        After each login I must exit the JBuilder and restart it in order
that userInfo = null.

        What is the problem ?
        Thanks a lot for your help,
        Sandra

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

Reply via email to