java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:336)
at
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:
1024)
at
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:
110)
at workcity.servlet.GenericServlet.checkToken(GenericServlet.java:36)
This is the java code:
HttpSession session = req.getSession();
ArcUtente vo = (ArcUtente) session.getAttribute(token);
req is a HttpServletRequest object !=null and
token is a String object != null.
You can help my?
Carlo
Looking at the JavaDoc for Hastable:
* @throws NullPointerException if the specified key is null
It very well could be token really is null.
Just to verify, try this:
HttpSession session = req.getSession();
if (token == null) { throw new NullPointerException("Token really IS
null!") };