`
yanfaguanli
  • 浏览: 663285 次
文章分类
社区版块
存档分类
最新评论

servlet解析不出来解决方法(is not a known servlet. Servlets belong in the classpath, often in WEB-INF/classes)

 
阅读更多

‘’is not a known servlet. Servlets belong in the classpath, often in WEB-INF/classes.
面对这种情况,本人解决的方法,目前有两个,陆续更新中。。。

1.查看自己的web.xml文件,开始有段这样的话
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/j2ee" -------------------------------》这里原来是javaee,将其改为j2ee。
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

基本上是解决了。如果还是提示有问题。

2.查看自己的servlet路径,也是在web.xml中

<servlet>

<servlet-name>AjaxServer</servlet-name>
<servlet-class>servlet.AjaxServer</servlet-class>---------------------》一定要对应自己的类得路径。
</servlet>

目前我经过这两部检查都解决了。希望帮到你们。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics