This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
victor chiong wrote:What I mean is that is their a way in struts2 just like in the servlets below? There is a mapping?
There is a mapping for Struts in web.xml (in Struts 2, it is actually implemented as a filter).
If you want to protect your pages from being accessed by users who aren't logged in, the best practice is to use the declarative security I linked to earlier.