信息: Scanning for root resource and provider classes in the Web app resource paths: /WEB-INF/lib /WEB-INF/classes 十一月 22, 2016 11:02:11 上午 com.sun.jersey.server.impl.application.WebApplicationImpl _initiate 信息: Initiating Jersey application, version 'Jersey: 1.4 09/11/2010 10:30 PM' 十一月 22, 2016 11:02:12 上午 com.sun.jersey.server.impl.application.RootResourceUriRules <init> 严重: The ResourceConfig instance does not contain any root resource classes. 十一月 22, 2016 11:02:12 上午 org.apache.catalina.core.ApplicationContext log 严重: StandardWrapper.Throwable com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes. 下面是jsp文件:
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<!--<%@ page import="Listener_session.MyHttpsessionListener" %>-->
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<h1>这是项目统计在线人数</h1>
<hr>
在线人数:${ub }
</body>
</html>
代码错误报告:com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes. 求大神指点怎么回事? 下面是监听器: package Listener1; import javax.servlet.annotation.WebListener; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; @WebListener public class HSL implements HttpSessionListener { private int ub; @Override public void sessionCreated(HttpSessionEvent se) { ub++; se.getSession().getServletContext().setAttribute("ub", ub); } @Override public void sessionDestroyed(HttpSessionEvent se) { ub--; se.getSession().getServletContext().setAttribute("ub", ub); } }
小草1434
相关分类