JAX-RPC sessions

From: Michael Servaas <>
Date: 11 Aug 2004 12:44:57 +0200


I am working on a project which requires me to implement sessions in my
JAX-RPC web services.
I have tried to do this using:

HttpServletRequest request;
HttpSession mySession = request.getSession(true);
mySession.setAttribute("sUserName", sUserName);

Later on I want to retrieve the "sUserName" property using:

String sUserName = (String) mySession.getAttribute("sUserName");

I get NullPointerExceptions (starting at HttpSession mySession =

Does anybody know how to implement sessions the right way?

Best Regards,


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