echocoder -2 Newbie Poster

I have an instance of Tomcat 7.0.32 installed. The server.xml is configured to use clientAuth="want" in the Connector. I have a Context that has a docBase set to be a network share. This particular Context I want the user to be authenticated before they can access it, otherwise I want them redirected to an error page. I have tried setting security constraints, filters and valves, but I am not sure I am doing it correctly. Could someone tell me the easiest / most efficient way to achieve the above access control to a context? Authenticated users would have the username in the session variable, so user accounts are not directly tied to the tomcat-users.xml file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.