I am writing a web-server using Tomcat. The tech i decided to use is JSTL.
I want to first say that it works, the page displays successfully and everything runs. I do like to get rid of warnings. The warning i get from intelliJ is: "Cannot resolve variable ''", it comes from a JSP page where i have some JSTL code. The jsp page is called from my controller using RequestDispatcher forward function.
request.setAttribute("resultsModel", resultsModel);
request.setAttribute("times", times);
request.setAttribute("emailErr", emailErr);
request.setAttribute("qid", id);
RequestDispatcher view = request.getRequestDispatcher("ShowResults.jsp");
view.forward(request, respone);
The JSP page then uses this variables in a variety of JSTL tags, example from page:
<c:choose>
<%-- When database access was succesfull --%>
<c:when test="${resultsModel != null}">
<c:choose>
<%-- When the job ID exists --%>
<c:when test="${resultsModel.jobEntity != null}">
ect...
The warning is then given on those positions where i try to access resultModel. I tried adding a jsp:useBean tag as such:
<jsp:useBean id="resultsModel" scope="request" type="bgu.bioinf.rnaSequenceSniffer.Model.ResultsModel"/>
But I still get a warning. Any idea? Something i am doing really wrong? Thanks!