• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

how to exclude past years in a jsp page

I'm trying to exclude past years from a jsp page.  Pls help.
0
shwelopo
Asked:
shwelopo
  • 2
2 Solutions
 
leakim971PluritechnicianCommented:
do a right click on the page and choose view source to post it here
0
 
girionisCommented:
You have to use the Calendar class and construct a today's instance (use the getInstance() method). Then use the compareTo method and check if the years compared are past or not.
0
 
Mahesh BhutkarCommented:
You can use GregorianCalendar class to get current year.
Calendar cal = new GregorianCalendar();
System.out.println(cal.get(Calendar.YEAR));

you can compare with current year & show only current & future years..
0
 
Mahesh BhutkarCommented:
Is the problem resolved?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now