PDA

View Full Version : Directory servlet


mxwoz
10-10-2010, 11:56 PM
I have just upgraded from resin 2.x to 4.0.10

I have an issue in that my application has a servlet called Directory when a user goes to this servlet they are getting a 401 (Not authorized)

I assume that this is because my applications Directory servlet is clashing with the resin directory listing servlet.

Questions
Does this sound like a correct fault diagnosis
How do I enable my servlet/disable the resin servlet

ferg
10-13-2010, 04:57 PM
As long as the servlet-name is not clashing with a Resin servlet, the class name doesn't matter (because the full classname includes the package as well.)

If you turn on logging level="finer", you should get more information why the request was forbidden.

mxwoz
10-16-2010, 04:58 AM
I have found where my problem lies but not the cause.
In resin 3.x when a user logged in the user principal was written to the session as caucho.login

So code in my servlet like

protected boolean isUserAuthorized(HttpSession session) {
return (session.getAttribute("caucho.login") != null);
}

would return true.

Looking in the session with a debugger under 4.1.10 I don't see any attributes



Question
Is not writing the Principal to the session by design or is it a bug
Is there some configuration that controls this behavior

this is my configuration

Well it would be but the forum software keeps insisting that it contains images and won't let me post. I tried URL escaping it but no joy
;