I have overridden the TilesREquestProcessor in order to test
if a user is authenticated for each request, but it doesn't work:
protected boolean processPreprocess(HttpServletRequest request,
HttpServletResponse response)
{
// Get the session object
HttpSession session = request.getSession();
try{
// Test if the request is a login request
String path = processPath(request, response);
if ( !path.equals((String) "/login") )
{
// If not a login page, test if the user is authenticated on
the application server
User userInfo =
(User)session.getAttribute(Constants.USER_KEY);
if ( userInfo == null ||
(userInfo != null && userInfo.getSessionId() == 0) )
{
processActionForward(request, response,
(ActionForward)appConfig.findForwardConfig("login"));
}
}
}
// if a servlet exception occurs
catch (ServletException ex)
{
}
//if an input/output error occurs
catch (IOException ex)
{
}
return true;
}
With the following login forward:
<forward name="login" path="/login.do" />
<action path="/login"
name="LoginForm"
validate="true"
type="com.Actions.LoginAction"
input="site.login.page"
scope="request">
<forward name="success" path="site.mainLayout" />
</action>
The following error is displayed:
java.lang.IllegalArgumentException: Path does not start with a "/"
character
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>