struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasen P. Halmes" <>
Subject url mappings and J2EE authentication
Date Mon, 15 Apr 2002 15:05:28 GMT
I am trying to get authentication working in a war file that is running
on WebSphere 4.0.2 through a struts based ui.  I have a login page that
does form based auth and that works just fine.  But when I link to a
struts controlled url the app loses its user Principal.  A call to
request.getUserPrincipal().getName() returns the string
"UNAUTHENTICATED" instead of the logged in user's name.

I have tried url mappings like this:  "action -> *.do" and then the web
resource contraint of /SysAdmin/*.do ( /SysAdmin is the directory where
the protected servlets live) but that didn't work so I changed the url
mapping to this "action -> /SysAdmin/" and then made the
constraint /SysAdmin/ and that still did not work.

How do I protect a struts action so that I can ensure that the user is
logged in so that the Principal object is valid at runtime?

Jasen Halmes

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

View raw message