943,550 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 4279
  • JSP RSS
Nov 9th, 2005
0

Date Problem

Expand Post »
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,
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zaman1111 is offline Offline
11 posts
since Aug 2004
Nov 9th, 2005
0

Re: Date Problem

I resolved it, thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
zaman1111 is offline Offline
11 posts
since Aug 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: Advance search
Next Thread in JSP Forum Timeline: hi,help me ,urgent





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC