惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Cloudflare Blog
L
LangChain Blog
WordPress大学
WordPress大学
V
V2EX
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Docker
Recent Announcements
Recent Announcements
GbyAI
GbyAI
博客园 - 叶小钗
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
雷峰网
雷峰网
The GitHub Blog
The GitHub Blog

博客园 - 敌后武工队

【攻克RabbitMQ】常见问题 MQ常问的问题 使用Docker在本地搭建Hadoop分布式集群 Centos7上安装docker VMware安装Centos7超详细过程 centos7配置IP地址 数据框架对比:Hadoop、Storm、Samza、Spark和Flink——flink支持SQL,待看 Centos版Linux 一些常用操作命令 Spring MVC 3.0.5+Spring 3.0.5+MyBatis3.0.4全注解实例详解(五) Spring MVC 3.0.5+Spring 3.0.5+MyBatis3.0.4全注解实例详解(四) Spring MVC 3.0.5+Spring 3.0.5+MyBatis3.0.4全注解实例详解(三) Spring MVC 3.0.5+Spring 3.0.5+MyBatis3.0.4全注解实例详解(二) Spring MVC 3.0.5+Spring 3.0.5+MyBatis3.0.4全注解实例详解(一) Spring定时任务的几种实现 Hibernate中的query.setFirstResult(),query.setMaxResults(); 在MyEclipse中如何去掉JS或jsp语法错误提示! 高并发高流量网站架构 ASP.NET性能优化之分布式Session ASP.NET中如何实现负载均衡
web.xml配置文件 taglib
敌后武工队 · 2014-03-16 · via 博客园 - 敌后武工队

web.xml的内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<web-app 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/j2ee 
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <taglib>
        <taglib-uri>struts2</taglib-uri>
        <taglib-location>/WEB-INF/tld/struts-tags.tld</taglib-location>
    </taglib>
</web-app>
在MyEclipse中会在taglib那一行有一个错误标志,但是运行的 时候没有问题……

原因:

所使用版本的问题,如果使用2.3版本就可以直接在<web-app>里面写:

<taglib>
        <taglib-uri>struts2</taglib-uri>
        <taglib-location>/WEB-INF/tld/struts-tags.tld</taglib-location>
    </taglib>

如果是用的是2.4版本,就不能直接这么写了,应该:

<jsp-config>
        <taglib>
            <taglib-uri>struts2</taglib-uri>
            <taglib-location>/WEB-INF/tld/struts-tags.tld</taglib-location>
        </taglib>
    </jsp-config>