我在classes先新建了个目录xnservlet,把编译好的servlet放进去了,运行的时候报错呀。
web.xml里也指定了,这是为什么?
但如果我把这个servlet放到classes下就是好的,帮帮忙呀!<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"><web-app>
<servlet>
<servlet-name>
Fy
</servlet-name>
<servlet-class>
Fy
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
Fy
</servlet-name>
<url-pattern>
/xnservlet/Fy
</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>
http://java.apache.org/tomcat/examples-taglib
</taglib-uri>
<taglib-location>
/WEB-INF/jsp/example-taglib.tld
</taglib-location>
</taglib> <security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/jsp/security/protected/*</url-pattern>
<!-- If you list http methods, only those methods are protected -->
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>tomcat</role-name>
<role-name>role1</role-name>
</auth-constraint>
</security-constraint>
</web-app>
web.xml里也指定了,这是为什么?
但如果我把这个servlet放到classes下就是好的,帮帮忙呀!<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"><web-app>
<servlet>
<servlet-name>
Fy
</servlet-name>
<servlet-class>
Fy
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
Fy
</servlet-name>
<url-pattern>
/xnservlet/Fy
</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>
http://java.apache.org/tomcat/examples-taglib
</taglib-uri>
<taglib-location>
/WEB-INF/jsp/example-taglib.tld
</taglib-location>
</taglib> <security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/jsp/security/protected/*</url-pattern>
<!-- If you list http methods, only those methods are protected -->
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>tomcat</role-name>
<role-name>role1</role-name>
</auth-constraint>
</security-constraint>
</web-app>
解决方案 »
- itext生成pdf加了iTextAsian.jar还是报“Font 'STSong-Light' with 'UniGB-UCS2-H' is not re“
- myeclipse突然不能debug。
- jdbc连接mysql 连接数据库成功 但是就是插入数据失败Table 'mydata.staff' doesn't exist
- 为什么我的程序在cmd下能运行,在这里就不行呢
- 弹出画面的状态栏的去留问题,请朋友帮一下忙!!!!!!!!!!!!!!!!!!
- 老问题,WEB开发报表怎么来做,说说你们项目是怎么来解决的?
- 怎样控制session
- jsp中如何将checkbox选中项删除?
- 在jsp中useBean动作的问题。
- 大神们帮我看看这个问题怎么解决
- 关于静态方法连接数据库的问题?
- 如何上传文件夹或者多个文件?
<servlet-class>xnservlet.Fy</servlet-class>