解决新版web.xml中配置 taglib的问题
2007-09-15 16:42
381 查看
搞了一下午配置,还以为哪里错了,很简单的一个东西弄了半天,后来才想倒是不是版本问题,真是郁闷
看到一下的文章,豁然开朗。
http://www.cnitblog.com/dickznew/archive/2006/12/01/19797.aspx
原来 如果所建项目是servlet2.4的,那么在web.xml中写taglib就要加一个
<jsp-config>标记
如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
TagStudy2
</display-name>
<jsp-config>
<taglib>
<taglib-uri>/hello</taglib-uri>
<taglib-location>/WEB-INF/HelloTag.tld</taglib-location>
</taglib>
</jsp-config>
<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
看到一下的文章,豁然开朗。
http://www.cnitblog.com/dickznew/archive/2006/12/01/19797.aspx
原来 如果所建项目是servlet2.4的,那么在web.xml中写taglib就要加一个
<jsp-config>标记
如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
TagStudy2
</display-name>
<jsp-config>
<taglib>
<taglib-uri>/hello</taglib-uri>
<taglib-location>/WEB-INF/HelloTag.tld</taglib-location>
</taglib>
</jsp-config>
<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
相关文章推荐
- 解决问题:在使用springmvc的web.xml配置乱码拦截器之后接收的get或者post请求中文还是乱码
- 启动primefaces和解决mime的问题 在web.xml文件中配置
- struts2.0 web.xml配置问题解决
- web.xml中taglib标签报错问题解决方案
- Web.xml配置<taglib>标签报错问题(cvc-complex-type.2.4.a: Invalid content was found starting with element 'tag
- 在web.xml中无法配置<taglib>的问题
- web.xml中taglib标签报错问题解决方案
- 需要解决post提交数据的时候,乱码的问题:在web.xml里做配置:
- SSH项目web.xml文件的常用配置【struts2的过滤器、spring监听器、解决Hibernate延迟加载问题的过滤器、解决中文乱码的过滤器】
- 在web.xml文件中配置信息,未起作用问题解决
- 02-解决不能在web.xml中配置action问题
- web.xml配置 struts 提交表单乱码问题解决
- spring mvc解决中文乱码问题需在web.xml文件中添加下面的配置
- 解决taglib在servlet2.4和jsp2.0下写入web.xml的问题
- 配置web-xml解决中文乱码问题
- WebSphere Application Server 更新web.xml的问题以解决有些应用在tomcat环境下可以跑,更新到was上失效的问题
- log4j和web.xml配置webAppRootKey 的问题
- web.xml配置Session超时时间注意的单位问题
- web.xml文件配置中出现的各种问题 4000
- log4j和web.xml配置webAppRootKey 的问题