org.netbeans.modules.j2ee.dd.api.web.WebApp.getVersion()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(68)

本文整理了Java中org.netbeans.modules.j2ee.dd.api.web.WebApp.getVersion()方法的一些代码示例,展示了WebApp.getVersion()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebApp.getVersion()方法的具体详情如下:
包路径:org.netbeans.modules.j2ee.dd.api.web.WebApp
类名称:WebApp
方法名:getVersion

WebApp.getVersion介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-core

boolean canCreate(TemplateWizard wizard){
  if ( webApp == null  ){
    // This case is considered as normal in other cases. So I keep it also as valid.
    return true;
  }
  if ( webApp.getStatus() == WebApp.STATE_INVALID_OLD_VERSION ){
    wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
      NbBundle.getMessage(ServletData.class, "MSG_OldVersion"));
    return false;
  } else if ( webApp.getStatus() == WebApp.STATE_INVALID_UNPARSABLE ){
    if ( webApp.getVersion() == null ){
      wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
        NbBundle.getMessage(ServletData.class, "MSG_UnuspportedVersion"));
    }
    else {
      wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
          NbBundle.getMessage(ServletData.class, "MSG_InvalidWebXml"));
    }
    return false;
  }
  return true;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-project-jsf

String facesConfigTemplate = "faces-config.xml"; //NOI18N
if (ddRoot != null) {
  if (WebApp.VERSION_2_5.equals(ddRoot.getVersion())) {
    facesConfigTemplate = "faces-config_1_2.xml"; //NOI18N

相关文章