Tomcat和Weblogic部署纯html文件
2023-09-14 08:58:22 时间
1、首先纯html文件,得有一个入口 index.html
2、Tomcat是不需要指定web.xml的,因为即使你的文件里没有web.xml,也会读取conf 目录下的web.xml,在这个文件里边指定了index.html的入口
Tomcat的话只要将原文件部署到 webapps\ 目录下,或者在\conf\Catalina\localhost 目录下新建xml文件,指向html页面
<?xml version='1.0' encoding='utf-8'?> <Context docBase="C:\Users\jiashubing\Desktop\dist" reloadable="false" privileged="true" antiResourceLocking="false" antiJARLocking="false"> </Context>
3、如果是Weblogic的话, 可以直接发布war包,但是如果想要发布纯html文件,必须要新建WEB-INF\web.xml 文件,否则无安装部署
web.xml 文件的写法也很简单,注意格式,不要有中文字符
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <welcome-file-list> <welcome-file>index</welcome-file> </welcome-file-list> <!--或者写成这种形式--> <!--<welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list>--> </web-app>
原创文章,欢迎转载,转载请注明出处!
相关文章
- Java+MyEclipse+Tomcat (三)配置MySQL及查询数据显示在JSP网页中
- spring boot tomcat 打本地包成war,通过Tomcat启动时出现问题: ZipException: error in opening zip file
- Tomcat 文章传送门
- mac下安装tomcat
- Linux命令修改Tomcat中的war包项目的属性文件
- tomcat相关配置技巧梳理
- python paramiko ssh.exec_command()启动tomcat服务器应用进程失败问题解决方法- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this progr
- 运维基础之Docker(2)通过docker部署zookeeper nginx tomcat java redis kibana/elasticsearch/logstash mysql kafka mesos/marathon ftp git
- The APR based Apache Tomcat Native library which allows optimal performance in production 问题的解决
- Tomcat Instance in Eclipse and in local folder
- Atitit 嵌入式tomcat 嵌入式服务器 attilax 你感觉艾提拉 总结 比起嵌入jetty ,文件可以自动刷新貌似还不错。。方便调试debug package com.attilax.
- idea tomcat 怎样出现update classes and resources
- Springboot项目执行时,控制台没有输出Tomcat端口
- eclipse使用内置tomcat和使用外部tomcat的设置
- 007-tomcat 下多个War发布详解步骤[同一个Tomcat 同一个端口 部署多个项目、同一个Tomcat 多个端口 部署多个项目]
- 015-Spring Boot 定制和优化内嵌的Tomcat
- tomcat管理员配置
- Mondrian+Tomcat+Pivot4J = ROLAP
- Tomcat I/O和线程池的并发调优
- tomcat Context容器(中):Tomcat如何隔离Web应用?