Just in case anyone else experiences the same problem this is how I solved it:
TestPrincipal user = new TestPrincipal("tim"); ServletContext context = getActionServlet().getServletContext(); HttpServletRequestSimulator hsrs = new HttpServletRequestSimulator(context); hsrs.setUserPrincipal(user); Note: TestPrincipal is a simple Java class that implements Principal and contains one method called getName(). Tim Christopher On Apr 5, 2005 11:16 AM, Tim Christopher <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know how to code a response to > request.getUserPrinciple().getName()? > > I've used that call at the start of many of my Actions so that only > relevant content would be displayed, however I'm now trying to run > unit tests I'm getting no where as the User Principle is not in the > request. > > Any help appreciated. > > Tim Christopher > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]