小编Car*_*ten的帖子

了解tomcat 6中的context.xml

我在eclipse中创建了一个主要空的动态Web项目.

它有

  • 没有servlet
  • 没有jsp文件

web.xml是

<?xml version="1.0" encoding="UTF-8"?>
<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_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>testprojekt</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>
Run Code Online (Sandbox Code Playgroud)

context.xml在其META-INF文件夹中添加了一个

<?xml version="1.0" encoding="UTF-8"?>
<Context>
        <Parameter name="companyName" value="My Company, Incorporated"  override="false"/>
</Context>
Run Code Online (Sandbox Code Playgroud)

我将此项目导出为WAR文件.具有以下结构:

user@system:$ tree
.
|-- META-INF
|   |-- MANIFEST.MF
|   `-- context.xml
`-- WEB-INF
    |-- classes
    |-- lib
    `-- web.xml

4 directories, 3 files
Run Code Online (Sandbox Code Playgroud)

当我将项目部署到本地tomcat(Apache Tomcat/6.0.20)时,一切都按预期工作.这意味着,context.xml被复制到/ conf/Catalina/localhost并重命名为testprojekt.xml.

当我将testprojekt.xml编辑为:

<?xml version="1.0" encoding="UTF-8"?>
<Context>
  <Parameter name="companyName" value="My BLAH Company, Incorporated" …
Run Code Online (Sandbox Code Playgroud)

java tomcat6 context.xml

6
推荐指数
1
解决办法
2万
查看次数

如何将对象变量用作块?

我有以下地形文件:

variable azure_network_interface_ip_configuration {
default = {
    name                          = "testconfiguration1"
    subnet_id                     = "1" #"${azurerm_subnet.test.id}"
    private_ip_address_allocation = "Static"
    private_ip_address            = "10.0.2.5"
    public_ip_address_id          = "1" #"${azurerm_public_ip.test.id}"
  }
  type = object({ name=string, subnet_id=string, private_ip_address_allocation=string, private_ip_address=string, public_ip_address_id=string })
}

resource "azurerm_resource_group" "test" {
  name     = "experiment"
  location = "westeurope"
}

resource "azurerm_virtual_network" "test" {
  name                = "test-network"
  address_space       = ["10.0.0.0/16"]
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
}

resource "azurerm_subnet" "test" {
  name                 = "acctsub"
  resource_group_name  = "${azurerm_resource_group.test.name}"
  virtual_network_name = "${azurerm_virtual_network.test.name}"
  address_prefix       = "10.0.2.0/24"
} …
Run Code Online (Sandbox Code Playgroud)

terraform

6
推荐指数
1
解决办法
4257
查看次数

标签 统计

context.xml ×1

java ×1

terraform ×1

tomcat6 ×1