com.sun.enterprise.config.serverbeans.Application.setContextRoot()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(80)

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

Application.setContextRoot介绍

[英]Sets the value of the contextRoot property.
[中]设置contextRoot属性的值。

代码示例

代码示例来源:origin: org.glassfish.main.core/kernel

private void setRestAppAttributes(Application app, Properties appProps)
  throws PropertyVetoException, TransactionFailure {
  // context-root element
  if (appProps.getProperty(ServerTags.CONTEXT_ROOT) != null) {
    app.setContextRoot(appProps.getProperty(
      ServerTags.CONTEXT_ROOT));
  }
  // property element
  // trim the properties that have been written as attributes
  // the rest properties will be written as property element
  for (Iterator itr = appProps.keySet().iterator();
    itr.hasNext();) {
    String propName = (String) itr.next();
    if (!propName.equals(ServerTags.LOCATION) &&
      !propName.equals(ServerTags.CONTEXT_ROOT) &&
      !propName.equals(ServerTags.OBJECT_TYPE) &&
      !propName.equals(ServerTags.DIRECTORY_DEPLOYED) &&
      !propName.startsWith(
        DeploymentProperties.APP_CONFIG))
        {
      if (appProps.getProperty(propName) != null) {
        Property prop = app.createChild(Property.class);
        app.getProperty().add(prop);
        prop.setName(propName);
        prop.setValue(appProps.getProperty(propName));
      }
    }
  }
}

代码示例来源:origin: fujitsu/launcher

private void setRestAppAttributes(Application app, Properties appProps)
  throws PropertyVetoException, TransactionFailure {
  // context-root element
  if (appProps.getProperty(ServerTags.CONTEXT_ROOT) != null) {
    app.setContextRoot(appProps.getProperty(
      ServerTags.CONTEXT_ROOT));
  }
  // property element
  // trim the properties that have been written as attributes
  // the rest properties will be written as property element
  for (Iterator itr = appProps.keySet().iterator();
    itr.hasNext();) {
    String propName = (String) itr.next();
    if (!propName.equals(ServerTags.LOCATION) &&
      !propName.equals(ServerTags.CONTEXT_ROOT) &&
      !propName.equals(ServerTags.OBJECT_TYPE) &&
      !propName.equals(ServerTags.DIRECTORY_DEPLOYED) &&
      !propName.startsWith(
        DeploymentProperties.APP_CONFIG))
        {
      if (appProps.getProperty(propName) != null) {
        Property prop = app.createChild(Property.class);
        app.getProperty().add(prop);
        prop.setName(propName);
        prop.setValue(appProps.getProperty(propName));
      }
    }
  }
}

代码示例来源:origin: org.glassfish.main.core/kernel

app.setObjectType("system-admin"); //TODO
app.setDirectoryDeployed("true");
app.setContextRoot(contextRoot);
try {
  app.setLocation("${com.sun.aas.installRootURI}/lib/install/applications/" + AdminConsoleAdapter.ADMIN_APP_NAME);

代码示例来源:origin: org.glassfish.admin/config-api

webModule.getDirectoryDeployed());
app.setLibraries(webModule.getLibraries());
app.setContextRoot(webModule.getContextRoot());
app.setAvailabilityEnabled(
  webModule.getAvailabilityEnabled());

相关文章

微信公众号

最新文章

更多