Sorry Bryan, you're correct - it IS in my BorderEngine.class : (public class BorderEngine extends BaseEngine).
My application has 1 menu item, Login. Once you log-in, it's replaced with your real menu containing a dozen items. Basically when I time-out my session (anyone know a quicker way to test this then waiting 20 minutes?!), the next menu item I click on, the menu goes back to the single "Login" item, and I get the message "You don't have permission to do that." This is because the validate() method of the page I suppose. It's checking what permissions are stored in the Visit object, which is nothing when it's expired. So you have no permissions to view any pages. I've tried checking the methods in BasePage, but I see no way to determine if a session is expired (and skip the error checking). Perhaps this validate is somehow overriding the Engine, although you would think the Engine method is called first? I've attached my validate() code below. Thanks, Greg //////////////// // Validates the permission of the page. public void validate(IRequestCycle cycle) { if (requiredPermission != null) { AdminVisit theVisit = (AdminVisit) getVisit(); if (!theVisit.hasPermission(requiredPermission)) { IPage permDenied = cycle.getPage("PermissionDenied"); PropertyUtils.write(permDenied, "permissionRequired", requiredPermission); throw new PageRedirectException(permDenied); } } super.validate(cycle); } ////////////////// -----Original Message----- From: Bryan Lewis [mailto:[EMAIL PROTECTED] Sent: Thursday, September 14, 2006 8:49 AM To: Tapestry users Subject: Re: Expired Session message Hmm, I thought from your previous post that this method was in your custom Engine class. The handleStaleSessionException() method in the Engine is what gets called when the exception occurs. If this method is in a page or component it won't be called. Still, if you named your exception-reporting page "StaleSession", it should've been invoked by the built-in error reporter even if this new method wasn't being called. What do you mean by "doesn't work"? [EMAIL PROTECTED] wrote: > Okay, I've taken both suggestions. I've renamed my page to "StaleSession", > and altered my code slightly. It still doesn't seem to work. > > protected void handleStaleSessionException(IRequestCycle cycle, > StaleSessionException exception) throws IOException > { > cycle.activate("StaleSession"); > renderResponse(cycle); > } > > > This is in my Border.java file. > > > However, all of my pages subclass an abstract class I've made for BasePage. > This overrides the validate() method of the page to check if the user has > permissions for that particular page. Could that be messing something up? > Should I put something in the validate() method? Is there some sort of > getExpired() function? > > Thanks, > Greg > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]