Cannot find the class file for javax.servlet.http.HttpServletRequest
843810Nov 13 2003 — edited Nov 14 2003Environment:
----------------
-Eclipse 2.0, j2sdk142, jakarta-struts-1.1,
-I think I've correctly added all jars to Java/Build path/Libraries
WEB-INF/lib (Contains)
-------------
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jstl.jar
standard.jar
struts.jar
struts-el.jar
WEB-INF (Contains)
-------------
struts-bean.tld
struts-html.tld
struts-logic.tld
Error(s): (2 error after using Ant are...)
--------------
1) This compilation unit indirectly references the missing type javax.servlet.http.HttpServletRequest
(typically some required class file is referencing a type outside the classpath)
InsertEmployeeAction.java LSN1/lsn1/WEB-INF/src/net/reumannline 0
2) Cannot find the class file for javax.servlet.http.HttpServletRequest.
Fix the classpath then try rebuilding this project. LSN1
Code follows. Thanks in advance.
/*
* Created on Nov 7, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package net.reumann;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.commons.beanutils.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author irishr
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public final class InsertEmployeeAction extends Action {
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
EmployeeService service = new EmployeeService();
EmployeeForm employeeForm = (EmployeeForm) form;
EmployeeDTO employeeDTO = new EmployeeDTO();
BeanUtils.copyProperties( employeeDTO, employeeForm );
service.insertEmployee( employeeDTO );
request.setAttribute("employee",employeeDTO);
return (mapping.findForward("success"));
}
}