Solved

how to exclude past years in a jsp page

Posted on 2014-01-05
6
250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to hide html tags in text area 4 32
Working with SharePoint Data 8 46
How does Redux fit into React? 3 66
Redirect Website for Mobile Devises 7 21
Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
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…
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…

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now