0

I have the following servlet code:

    SearchResult[] basicResults = AuctionSearchClient.basicSearch(search, numToSkip, numToReturn);

    request.setAttribute("search_result", basicResults);
    request.getRequestDispatcher("/search.jsp").forward(request, response);

Then in my search.jsp file I have the following code:

SearchResult[] searchResult = (SearchResult[])request.getAttribute("search_result");

However I am getting an error saying:

SearchResult cannot be resolved to a type

request is an object of type HttpServletRequest. Why am I getting this casting error?

Chris Ner
  • 91
  • 6

0 Answers0