JSP BasicsBeginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
hey guys..i need to know how to get the current month in jsp..as well as how do i get the month from a time stamp.Pls tell me of the classes that need to be imported as well..if there is any.Really appreciate ur help. =]
u can use the calendar class provided by sun.
This should do wat u want,
Calendar cal = Calendar.getInstance();
int iYear = cal.get(Calendar.YEAR);
int iMonth = cal.get(Calendar.MONTH)+1;
int iDate= cal.get(Calendar.DAY_OF_MONTH);