【javaWeb第四天】-Web资源访问概述
来源:互联网 发布:完美卸载软件评价 编辑:程序博客网 时间:2024/06/06 04:30
netstat - ano查看端口占用情况
Web应用供外界访问方法
1.放在tomcat的webapp文件夹中。
2.虚拟映像
tomcat提供5种方法。
http://localhost:8080/docs/config/context.html
Context elements may be explicitly defined:
- In the
$CATALINA_BASE/conf/context.xml
file: the Context element information will be loaded by all webapps. - In the
$CATALINA_BASE/conf/[enginename]/[hostname]/context.xml.default
file: the Context element information will be loaded by all webapps of that host. - In individual files (with a ".xml" extension) in the
$CATALINA_BASE/conf/[enginename]/[hostname]/
directory. The name of the file (less the .xml extension) will be used as the context path. Multi-level context paths may be defined using #, e.g.foo#bar.xml
for a context path of/foo/bar
. The default web application may be defined by using a file calledROOT.xml
. - Only if a context file does not exist for the application in the
$CATALINA_BASE/conf/[enginename]/[hostname]/
, in an individual file at/META-INF/context.xml
inside the application files. If the web application is packaged as a WAR then/META-INF/context.xml
will be copied to$CATALINA_BASE/conf/[enginename]/[hostname]/
and renamed to match the application's context path. Once this file exists, it will not be replaced if a new WAR with a newer/META-INF/context.xml
is placed in the host's appBase. - Inside a Host element in the main
conf/server.xml
.
使用第四种
若Tomcat 和Web应用不在同一个盘中,可在tomcat的conf/Catalina/localhost目录中加一个XML文件,文件名为虚拟映像名,如zpy.xml,内容为<Context docBase="F:\web文件名"/>,服务器会自动加载该应用。
在项目的Web-inf目录中可配置首页,输入项目名即可访问(http://localhost:8080/Test/)
<welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list></web-app>
reloadable 设置为true.改过之后 不需要重新发布,服务器会自动 更新。在实际开发中最好不要配制,因为一但改动就会重新加载,应用较大时一旦连续加载会挂掉。
- 【javaWeb第四天】-Web资源访问概述
- Struts2-Action概述和在Action中访问WEB资源
- JavaWeb中的Web.xml概述
- JavaWeb第四天——01,web开发入门
- JavaWeb第四天——02,常见的web服务器
- JavaWeb-web概述与Http概述
- javaweb-day04-4(javaWeb开发入门 - 画图演示:浏览器访问服务器的静态web资源的过程)
- web 资源访问图
- web资源访问流程
- Web资源访问流程
- Struts2-访问web 资源
- web资源访问流程
- web资源访问流程
- 限制访问Web资源
- Struts2-访问Web资源
- Struts2_005_访问 web 资源
- javaweb项目如何访问静态资源
- JavaWeb基础学习第四天
- openfire整合现有系统用户
- 系统配置更改监控 RANCID
- openfire整合
- javascript/JS限制用户名只能输入 汉字字母和数字下划线
- 关于eclipse在引用外来Crouton的库的时候出现 Could not find library.apk! 错误的处理
- 【javaWeb第四天】-Web资源访问概述
- 终端会话监控软件 Ttyutils
- wince流驱动开发流程(转载)
- 一个简单的第三人称汽车驾驶系统
- LiferayPortlet的配置画面的值保存到数据库
- Hadoop MapReduce数据流
- Interact uploadify3.1 with jsp
- php经典实例-笔记4-数据库
- jsp页面定义的struts2 set标签问题 怎么解决?