I am using Tomcat6.0, Eclipse SDE 7.0 Express for Web Developers, and jdk1.6
In my jsp page i have a code that looks like the followeing
<%
List<String> options = new ArrayList<String>();
DynamicCombo comboBox = new DynamicCombo();
options = comboBox.generateComboBox();
Collections.sort(options);
int tempVar = 0;
while (tempVar < options.size()) {
out.print("<option value=\"");
out.print(options.get(tempVar));
out.print("\">");
out.print(options.get(tempVar));
out.print("</option>");
tempVar++;
}
%>
DynamicCombo is a class inside the package com.ems.billGen.util and i am importing this package in the jsp appropriately as :-
<%@page import="com.ems.billGen.util.*" %>
This class DynamicCombo has a method named generateComboBox(), that simply creates a list of strings and returns this string.
When I hover over the class DynamicCombo in the above jsp, i realize that it is well recognized because i get the proper documentation for the class. Please see the screen shot below :-
Now when i deploy the above page and view it in firefox, i get the following jasper exception :-
An error occurred at line: 36 in the jsp file: /implementation.jsp
DynamicCombo cannot be resolved to a type
33: <td><select name="product_list">
34: <%
35: List<String> options = new ArrayList<String>();
36: DynamicCombo co = new DynamicCombo();
37: options = co.generateComboBox();
38: Collections.sort(options);
39: int tempVar = 0;
I am not able to understand the reason, and how to solve this issue. Any inputs are appreciated.
The respective class file is also being generated for DynamicCombo in the web-inf folder of the war file as:-