我开发了一个正确部署在Apache Tomcat上的Java动态Web项目。现在我试图在WebSphere Application Server 8.5上部署.war文件。企业应用程序是正确创建,但是当我尝试用浏览器来达到我的应用程序出现以下错误:WebSphere Application Server 8.5上的SRVE0200E错误
Error 404: javax.servlet.UnavailableException: SRVE0200E: Servlet [it.foo.simpleapp.SimpleApp]: Could not find required class - class java.lang.ClassNotFoundException: it.foo.simpleapp.SimpleApp
的应用程序非常简单:它应该有一个text/html的回答内容时GET到达。
我很确定.war文件是正确的,但我是WebSphere部署的新手。
servlet类是:
@WebServlet("/")
public class SimpleApp extends HttpServlet {
private static final long serialVersionUID = 1L;
public SimpleApp() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.getWriter().print("<html><body><h1>SimpleApp servlet ready!</h1>");
response.getWriter().print("</body></html>");
response.setContentType("text/html");
}
}
的的web.xml文件是:提前
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>SimpleApp</display-name>
</web-app>
谢谢!