my dog learned polymorphism
The moose likes JSP and the fly likes urgent!!drop down menu for year Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "urgent!!drop down menu for year" Watch "urgent!!drop down menu for year" New topic

urgent!!drop down menu for year

sunita shaw
Ranch Hand

Joined: Apr 06, 2003
Posts: 45
i'm designing a jsp page in which i want a text field from which i select a year from a drop down menu & then "ok" it.but this drop down year should be from the system's calendar i.e the current year & the next 10 years do i do it.please le t me know soon.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13027
Heading a post "Urgent" does not do anything but take up space you might otherwise use to be informative. You might start by examining the methods in the java.util.Date class.
Nitin Barhanpurkar

Joined: Apr 01, 2003
Posts: 8
Create a Date object(without parameters) and then use the getYear method. Add 1900 to this value, will get the current year.
I agree. Here's the link:
subject: urgent!!drop down menu for year
It's not a secret anymore!