I two have a jsp page. One is news.jsp and the other is news1.jsp. news.jsp contains a form that passes two parameter to news1.jsp.One the other hand news1.jsp contains the same form of news.jsp that passes these 2 parameter to itself. The reason i m doing this is because i m using a web pager that displays all record on news.jsp page and on news1.jsp page display a range of date selected by the user.
I declare it as:
String start_date = request.getParameter("st_date");
String end_date = request.getParameter("en_date");
My problem is when i pass the start date and end date to news1.jsp from news.jsp, the page will display only 10 records as i want ranging from the date chosen. However when i click next, the start_date and end_date becomes null value, and causes my ResultSet to pass null value to the function and this cause a SQL error. How can i possible solve this logic ?
ResultSet rs_viewSelectedNews1 = dbconnect.viewNewsByDate(start_date,end_date);
this line pass null value when i click on next. To retrieve next 10 records.