servlet为什么要配置web.xml
来源:互联网 发布:北航软件学院毕业生 编辑:程序博客网 时间:2024/04/30 13:51
(1)、为Servlet命名:
<servlet>
<servlet-name>servlet1</servlet-name> <- 这是用于,在servlet池中使用 ,在用servlet注解时->
<servlet-class>net.test.TestServlet</servlet-class> <- 包名.类名 ->
</servlet>
(2)、为Servlet定制URL、
<servlet-mapping>
<servlet-name>servlet1</servlet-name> <- 上段servlet名 ->
<url-pattern>*.do</url-pattern> <- 此为使用的地址如:http://localhost:8080/app/*.do *匹配任何.do 也可以写死如test.do ->
</servlet-mapping>
在web.xml中配置servlet。是为了页面能够找到对应的servlet。
0 0
- servlet为什么要配置web.xml
- web.xml配置Servlet
- servlet web.xml配置
- web.xml配置servlet
- web.xml 配置-servlet
- servlet的web.xml配置
- Web.xml配置Servlet - Excerpts
- servlet 下配置web.xml
- web.xml之Servlet配置
- java web.xml配置servlet
- web.xml中配置servlet
- web.xml中配置servlet
- 转servlet web.xml配置
- servlet过滤器 web.xml配置
- servlet中web.xml配置
- web.xml配置详解servlet
- web.xml中配置Servlet
- java web.xml配置servlet
- 做一个网站多少钱?
- 趣文:软件工程师的鄙视链
- C++11 线程库(高层接口)
- 批量合并excel工作表
- UIday11
- servlet为什么要配置web.xml
- matlab自动输出数据到excel文件的指定单元格
- 选择排序优化三点
- 远程连接SQL Server 2008,服务器端和客户端配置
- 求长度
- DFS之全排列
- Z.N 工作室
- matlab 指针数据转换为数组数据,用于求平均值、最大值
- 【HEVC学习与研究】29、解码第一个Coding Quadtree结构(1)