Actually thinking about it, My main problem is if,
for some reason, someone tries to enter a request into the location bar, that calls a JSP. There is no problem if my app links to a page, as it would already have to go through an action. So basically I want to make it as air tight as possible. in short, I want to be able to intercept the URL if someone manually type in http://localhost:8081/WebApp/blah.jsp This is unlikely, but would rather be able to stop people playing around with the site when it goes live Regards Steve Vanspall -----Original Message----- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 8 January 2003 5:30 PM To: Struts Users Mailing List Subject: Re: Request Processor to intercept URL that call a JSP as well as actions On Wed, 8 Jan 2003, Steve Vanspall wrote: > Date: Wed, 8 Jan 2003 17:08:04 +1100 > From: Steve Vanspall <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts User Mailing List <[EMAIL PROTECTED]> > Subject: Request Processor to intercept URL that call a JSP as well as > actions > > Hi there, > > I have succesfully restricted access to certain Actions, using a > RequestProcessor I have made. > > But I have notices that the RequestProcessor processPreProcess file only > seems to be called if a URL is determined to be an action. > > I would like, also to be able to intercept a request if it is for a JSP. > Do you mean an original request from the client that goes directly to a JSP page? If so, your best bet is probably one of the following alternatives: * Use a Servlet 2.3 or later container (like Tomcat 4.x) and write a Filter that is mapped to your JSP page's URL. The filter will be invoked first on the original request, and can do whatever interception things you need. * Rearchitect your application to flow all requests through the Struts controller servlet (even if it's just a trivial action that forwards to a page) so that processPreprocess() has a shot at intercepting this request. > Is there something I can write that will do that? > > Perhaps there is another method in the RequestProcessor that I can use. > > Any help would be appreciated. > > Regards > > Steve Vanspall > Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>