| | |
Date Problem
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2004
Posts: 11
Reputation:
Solved Threads: 0
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,
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,
![]() |
Similar Threads
- date problem (Visual Basic 4 / 5 / 6)
- SAS/Oracle Date Problem (Computer Science)
- Date Problem (MS SQL)
- SQL date problem (MS SQL)
- Small date problem (ASP)
- Dreamweaver MX2004 & date problem, etc. (Graphics and Multimedia)
Other Threads in the JSP Forum
- Previous Thread: Advance search
- Next Thread: hi,help me ,urgent
| Thread Tools | Search this Thread |
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write





