When I call a JavaServerPage with the following simple code I got a NullPointerException. I just want to store the current date into a variable inside the session object.
... <%@ page import="java.util.*" %> .... <% session = request.getSession(true); String firstVisit = (String) session.getAttribute("firstVisit"); if (firstVisit.equals("")) { session.setAttribute("firstVisit",(new Date()).toString()); firstVisit = "new session"; } %> First Visit: <%= firstVisit %> ... I don't believe that the error is because of the "new Date()" code. It seems to be a more general problem. Do I have to add some more page import statements ? Thomas View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3851616#3851616 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3851616 ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user