I need to go back say a week from a particular date eg. need to go
back a week from today (i.e. to find date of a week ago) taking into
consideration any start day of months like eg 1 Jan.
I tried using this piece of code but i was being given an error:
Calendar now = Calendar.getInstance();
int nowdate= now.get(Calendar.DATE);
add(nowdate, -7);
When i printed nowdate i was getting this error (This was actually a
jsp file & all relevant jsp tags were in place with the above piece
of code):
Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server
Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred between lines: 55 and 56 in the jsp
file: /adminconsoletest.jsp
Generated servlet error:
C:\jakarta-tomcat-4.0.4
\work\Standalone\localhost\_\adminconsoletest$jsp.java:90: Method add
(int, int) not found in class org.apache.jsp.adminconsoletest$jsp.
add(nowdate, 7);
^
Note: C:\jakarta-tomcat-4.0.4
\work\Standalone\localhost\_\adminconsoletest$jsp.java uses or
overrides a deprecated API. Recompile with "-deprecation" for
details.
1 error, 1 warning