I am trying to test the following servlet code using httpunit servlet runner. Here every thing goes fine except jsp pages which includes jstl.
public class ListTenantServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
private static final Logger log = Logger.getLogger(ListTenantServlet.class.getName());
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,
IOException {
doProcess(req, res);
}
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException,
IOException {
doProcess(req, res);
}
private void doProcess(HttpServletRequest req, HttpServletResponse res) throws ServletException,
IOException {
CompanyStatus companyStatus = TenantStatus.Paid;
req.setAttribute("companyStatus" companyStatus);
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/tenantList.jsp");
dispatcher.forward(req, res);
}
If i try to test the above code it is giving the following exception but the servlet is working fine in the local server.
Error on HTTP request: 500 org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application [http://localhost/contextParam/tenantmgr/listTenant]
Note: My ListTenant.jsp is having jstl code, the test works fine if i remove the jstl code.
Please help me to make it work.