servlet程序HTTP Status 500 - Error instantiating servlet class 解决

问题描述

web项目中请求出现错误,如下:
HTTP Status 500 - Error instantiating servlet class XXXX类
type Exception report
message Error instantiating servlet class test.Test
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error instantiating servlet class

root cause
java.lang.ClassNotFoundException:XXXX类

再次刷新 则出现404错误

解决方法:问题出在web.xml上,xxx应该配置为servlet所在的包名.servlet的名称

	例如:cn.fth.servlet.RecommenderServlet

你可能感兴趣的:(java)