Mark
asked on
jsp - Calendar class not working
I have jsp code:
<%@ page import="java.util.Calendar " %>
Calendar thisYear = new GregorianCalendar();
But, this doesn't work. I get the error: "GregorianCalendar cannot be resolved to a type"
What am I doing wrong? In the alternative, I'm just trying to get the current year. Alternate suggestions?
<%@ page import="java.util.Calendar
Calendar thisYear = new GregorianCalendar();
But, this doesn't work. I get the error: "GregorianCalendar cannot be resolved to a type"
What am I doing wrong? In the alternative, I'm just trying to get the current year. Alternate suggestions?
You haven't imported GregorianCalendar
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You have to do
<%@ page import="java.util.Gregoria nCalendar" %>
<%@ page import="java.util.Gregoria
ASKER
CEHJ: including <%@ page import="java.util.Gregoria nCalendar" %> let me compile, but your 2nd suggestion is all I need. Thanks!
No problem :-)
ASKER
I thought I accepted this already!
:-)