Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Preventing access to certain servlets from outside

843842Mar 17 2010 — edited Mar 19 2010
I have a set of servlets dedicated for sending responses to the client. These response servlets are used by forwarding the request with RequestDispatcher from other servlets. I would like to restrict the access of the servlets, so that they cannot be accessed directly by the client. What is the best way to do this?

I was looking at using a filter and setting the dispatcher tag to FORWARD in the filter mapping, but is there an easier way? Somehow with servlet mapping in the web.xml?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2010
Added on Mar 17 2010
7 comments
1,853 views