tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Deheul" <xdeh...@wanadoo.fr>
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() =
com.website.security.UserPrincipal
request.getPrincipal() instance of com.website.security.UserPrincipal =
false

UserPrincipal princ=(UserPrincipal)request.getUserPrincipal() =
org.apache.jasper.JasperException: 	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
...

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
directory.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message