Hi, can anyone suggest any clue on this.
I am trying to display info on a JSP page. The problem is if the DB date is null then I get the error message below.
java.util.Date loginTime=new java.util.Date(login_time);
the login_time is a Oracle DB date. Now I want to somehow skip that date if its null and display the info.
if (login_time != null) {
java.util.Date loginTime=new java.util.Date(login_time);
....code to display date
} else {
....code to dipslay null date
}

....code to display null date PART
I want to generate a JSP page which might say a message something like " No Entry Found" But Its not working. THe error it generates:

java.lang.IllegalArgumentException at java.util.Date.parse(Date.java:582) at java.util.Date.(Date.java:264) at jrun__view_roster22ejsp11._jspService(jrun__view_roster22ejsp11.java:192) at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at jrun.jsp.JSPServlet.service(JSPServlet.java:119) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:168) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Error:
null

Thanks,

This article has been dead for over six months. Start a new discussion instead.