• Cannot change version of project facet Dynamic Web Module to 3.0


    步骤:

    1.打开web.xml,查看下version是否是3.0

    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:web
    ="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation
    ="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    id
    ="WebApp_ID" version="3.0">

    2.打开项目下.setting目录下的org.eclipse.wst.common.project.facet.core.xml ,"jst.web"对应的version改为“3.0”

    <?xml version="1.0" encoding="UTF-8"?>
    <faceted-project>
      <fixed facet="wst.jsdt.web"/>
      <installed facet="wst.jsdt.web" version="1.0"/>
      <installed facet="jst.web" version="3.0"/>
      <installed facet="java" version="1.7"/>
    </faceted-project>

    3.执行项目右键Maven的Update Project.

    dynamic web module 版本之间的区别:

    Servlet 3.0 December 2009 JavaEE 6, JavaSE 6 Pluggability, Ease of development, Async Servlet, Security, File Uploading
    Servlet 2.5 September 2005 JavaEE 5, JavaSE 5 Requires JavaSE 5, supports annotations
    Servlet 2.4 November 2003 J2EE 1.4, J2SE 1.3 web.xml

     

  • 相关阅读:
    去除字符串中多余空格
    day02-03 字符编码
    eclipse与myeclipse区别
    xz解压和zip解压
    yum安装
    防火墙
    查看和操作HBA卡
    复制linux虚拟机后网卡不能用的解决方法
    关闭IPv6
    更改root密码
  • 原文地址:https://www.cnblogs.com/liaojie970/p/5527780.html
Copyright © 2020-2023  润新知