i don't know how to discuss it clearly but i'll try.. my problem is when my index page loads, the current value of my variable year is null.. so it displays the word null.. ahm, only if i click the submit button that's the time that a value is inserted in that variable.. i have values on my select tag.. from 2008 - 2007.. that's where data should come from..
so when i get parameter from the select tag, once it initially loads, null value is generated.. hope it's a li'l bit clearer.. i'm just a newbie.. that's why..
<html>
<head>
<title></title>
</head>
<body>
<%
java.util.Date today = new java.util.Date();
String s = DateFormat.getDateInstance(DateFormat.LONG).format(today);
out.print(s);
%>
<table border="0" cellspacing="0" cellpadding="5">
<tr>
<td>
<form method = "post" action = "MonthlyTrend.jsp">
<select name = xyear>
<%
String year = request.getParameter("xyear");
for (int i=(1900 + today.getYear()); i >= 2005; i--) {
if(i == today.getYear())
out.println("<option value=" + i + " selected = \"selected\">" + i + "</option>"+i);
else
out.println("<option value=" + i + ">" + i + "</option>"+i);
}
%>
</select>
<input type = "Submit" value = "GO">
</form>
</td>
</tr>
</table>
<br><b><%= year %> Monthly Test MCBJ Trend</b></font><br>
</body>
</html>