title: Show custom error page after forcing logout in Liferay
body: <p>We have a requirement wherein I need to force logout user if some condition is met. I have written a <code>PostLoginAction</code> hook to check the condition and doing <code>getSession().invalidate()</code> when the condition is met. But after this, since there is no active session, Liferay takes me to login screen by default(prolly using a filter). If I try to redirect to one of the error pages inside <code>/ROOT/html/common/</code>, i get a cryptic <em>internal server error</em> page.</p>
  
  <p>At this point, I need to display an error message but all the redirects are ending up on login page. What should be the right way of doing this?</p>
  
  <p>Just on a side note, is there a way to display the error message on the login page itself instead of redirecting to some other page? I have tried using <code>sessionErrors.add()</code> method to achieve the same, but that too has not worked.</p>
  
  <p>Let me know if you need any more details.</p>