jerome1985
23 Mar 2009, 6:59 PM
hello
I want to use session in the server
public class WcmServiceImpl extends RemoteServiceServlet implements WcmService {
private HttpSession getSession() {
return this.getThreadLocalRequest().getSession();
}
public boolean checklogin(String name, String password) {
if (name.equals(password)) {
return false;
} else {
HttpSession session=this.getSession();
System.out.println(session.getCreationTime());
return true;
}
}
}
error:StandardWrapperValve[shell]: Servlet.service() for servlet shell threw exception
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract boolean com.hundsun.fund.website.wcm.client.WcmService.checklogin(java.lang.String,java.lang.String)' threw an unexpected exception: java.lang.NullPointerException
how to fix it;
thanks
I want to use session in the server
public class WcmServiceImpl extends RemoteServiceServlet implements WcmService {
private HttpSession getSession() {
return this.getThreadLocalRequest().getSession();
}
public boolean checklogin(String name, String password) {
if (name.equals(password)) {
return false;
} else {
HttpSession session=this.getSession();
System.out.println(session.getCreationTime());
return true;
}
}
}
error:StandardWrapperValve[shell]: Servlet.service() for servlet shell threw exception
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract boolean com.hundsun.fund.website.wcm.client.WcmService.checklogin(java.lang.String,java.lang.String)' threw an unexpected exception: java.lang.NullPointerException
how to fix it;
thanks