Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Struts and the fly likes Custom RequestProcessor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Custom RequestProcessor" Watch "Custom RequestProcessor" New topic

Custom RequestProcessor

Abhay Kumar J

Joined: Feb 20, 2009
Posts: 1
I'm developing a struts application, in which I've extended the RequestProcessor to check the session. Everything is fine and works as expected. But an unauthenticated user can simply access the JSP pages directly. Here the request to the JSP page completely bypasses the RequestProcessor, only requests with logical labels like go through the RequestProcessor.

After searching the web, one solution is to keep the JSP pages inside the WEB-INF directory. But is it possible to send every request through the RequestProcessor?
David Newton

Joined: Sep 29, 2008
Posts: 12617

The RequestProcessor only processes Struts 1 requests. In other words, whatever the Struts 1 servlet is mapped to (*.do by default).

Putting the JSPs under /WEB-INF is the canonical and recommended solution.
I agree. Here's the link:
subject: Custom RequestProcessor
It's not a secret anymore!