tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Deheul" <>
Subject getUserPrincipal and custom realm
Date Wed, 12 Nov 2003 21:29:35 GMT

I wrote my custom Realm for a form-based-authentication and everything is
successfull (I declare the realm in my context in the server.xml file, I
gives the mbean descriptor and the librairies file to the server)

However I still have a last problem after the user-form authentication when
I call the request.getUserPrincipal. When I cast the class to my principal,
there is a jasperException :

request.getPrincipal().getClass().getName() =
request.getPrincipal() instance of =

UserPrincipal princ=(UserPrincipal)request.getUserPrincipal() =
org.apache.jasper.JasperException: 	at
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(
	at org.apache.jasper.servlet.JspServlet.service(
	at javax.servlet.http.HttpServlet.service(

I think that there is perhaps a conflict between my WEB-INF/classes files
and the $TOMCAT/server/lib  librairies (which are the same classes). How can
I solve this problem ? Can I redefine the getUserPrincipal ? (with caucho
resin the authenticator class is called to answer)

Could you help me ?

Thanks a lot

PS : I have also a little question :
Why must I declare the jar librairies in the server lib directory if the
authentication is only for my context ? For example with caucho resin the
server looks for the authenticator classes only into the WEB-INF/lib

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message