Solved

how to exclude past years in a jsp page

Posted on 2014-01-05
6
253 Views
Last Modified: 2014-03-04
I'm trying to exclude past years from a jsp page.  Pls help.
0
Comment
Question by:shwelopo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 39759043
do a right click on the page and choose view source to post it here
0
 
LVL 35

Accepted Solution

by:
girionis earned 250 total points
ID: 39761515
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
 
LVL 6

Assisted Solution

by:Mahesh Bhutkar
Mahesh Bhutkar earned 250 total points
ID: 39761863
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
 
LVL 6

Expert Comment

by:Mahesh Bhutkar
ID: 39799595
Is the problem resolved?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question