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
Solved

how to exclude past years in a jsp page

Posted on 2014-01-05
6
252 Views
Last Modified: 2014-03-04
I'm trying to exclude past years from a jsp page.  Pls help.
0
Comment
Question by:shwelopo
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

809 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