Click Here To Get Amazing Facebook Profile Covers,Status Messages

The type Date is ambiguous jsp error

1 reply [Last post]
angel's picture
angel
User offline. Last seen 2 years 39 weeks ago. Offline
Joined: 08/22/2009

How to resolve the following exception in JSP i was just trying to define a new date.

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 411 in the jsp file: /raj.jsp
The type Date is ambiguous

411: Date vupto=new Date();


rajesh's picture
rajesh
User offline. Last seen 12 weeks 6 days ago. Offline
Joined: 08/17/2009
se java.util.Date

If you have imported both java.sql.* and java.util.* then both of these has different classes so be specific write java.util.Date instead of simply writing Date.
java.util.Date vupto=new java.util.Date();