摘要:1. 新建一个 maven project (web app) 得到如下项目 2. 添加 servlet 和 jsp 依赖 通常 servlet 和 jsp 依赖由web容器提供,这个编译错误并不会影响运行,但是为了开发方便,可以提供(provided)依赖 3. 创建servlet 右键项目 -
阅读全文
摘要:JSR340 在Servlet规范中,关于 web.xml 的 url-pattern 两种格式: 例如:/* 例如:*.do 规范中不存在 /** 上面的日志信息中指出 这是可疑的 ,请参考 Servlet 参考文档的 12.1 和 12.2 章节 spring mvc 中dispatcher 的
阅读全文
摘要:Servlet Life Cycle http://docs.oracle.com/javaee/5/tutorial/doc/bnafi.html Servlet Filters and Event Listeners http://docs.oracle.com/cd/B14099_19/web
阅读全文
摘要:1. 新建一个 webapp 参考 http://www.cnblogs.com/zno2/p/5909019.html 2.调整jdk版本 修改 pom.xml 文件,将jdk 调整为适当的版本,比如 1.7 上面这个错误需要执行一下 maven - update project 3. 升级web
阅读全文
摘要:ContextPath Context ['kɒntekst] 不识庐山真面目,只缘身在此山中。 相对路径 RealPath 绝对路径 ServletPath 就是servlet-mapping 中 的 url-pattern
阅读全文
摘要:官方文档: http://docs.oracle.com/javaee/6/tutorial/doc/gijre.html 启动log: 访问: http://localhost:8080/converter/ConverterServlet?amount=100 结果: ps: 访问http://
阅读全文
摘要:The order the container uses in building the chain of filters to be applied for a particular request URI is as follows:1. First, the <url-pattern> mat
阅读全文
摘要:1. 这是一个过滤器代理 <filter-name>shiroFilter</filter-name> 的值会传递给 targetBeanName , targetBeanName = "shiroFilter"; shiroFilter 是由Spring管理的bean,并实现了Filter 接口。
阅读全文
摘要:The dispatcher has four legal values: FORWARD, REQUEST, INCLUDE, and ERROR. A value of FORWARD means the Filter will be applied under RequestDispatche
阅读全文
摘要:@(#)web-app_2_4.xsds 1.61 04/04/16 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2003-2007 Sun Microsystems, Inc. All rights ...
阅读全文
摘要:http://docs.oracle.com/cd/E14571_01/web.1111/e13712/web_xml.htm context-param description display-name distributable ejb-ref ejb-local-ref env-entry e
阅读全文