?
Solved

how to exclude past years in a jsp page

Posted on 2014-01-05
6
Medium Priority
?
258 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 1000 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 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
Suggested Courses

800 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