Netbeans如何添加JavaEE版本?

est*_*con 9 java-ee netbeans-8

我最近下载了符合JavaEE 8标准的Glassfish 5,我现在的问题是,当我尝试创建Java Web应用程序时,我看不到JavaEE 8版本,只能从JavaEE 5 - 7开始.

我的{netbeans_install_path} /etc/netbeans.conf指向JDK 8:

netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_131"
Run Code Online (Sandbox Code Playgroud)

如何将JavaEE 8添加到选项中?

Bal*_*usC 11

如何将JavaEE 8添加到选项中?

NetBeans还没有Java EE 8兼容版本.

NetBeans就像一个美化的文本编辑器,有100万个附加功能,主要是代码生成器.什么它不能为你自动生成,你可以像写一个硬核程序员一样使用Notepad写自己;)只需选择Java EE 7版本,让Netbeans做自动生成必要文件的无聊工作,然后手动编辑位置的XML架构资源和所需的部署描述符文件版本的自己.

Servlet 4.0 web.xml:

<web-app
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
    version="4.0">
Run Code Online (Sandbox Code Playgroud)

JSF 2.3 faces-config.xml:

<faces-config
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd"
    version="2.3">
Run Code Online (Sandbox Code Playgroud)