how2j.cn

步骤 1 : 修改server.xml   
步骤 2 : 重启   
步骤 3 : 观察日志   
步骤 4 : 访问公网地址   

使用vi打开server.xml

vi /usr/local/tomcat7/conf/server.xml

然后在<host下面增加一行

<Context path="/tmall" docBase="/home/wwwroot/ftptest/tmall/web" debug="0" reloadable="false" />

修改完成之后,保存退出。
对使用vi命令打开,编辑,保存不熟悉的同学请参考前面的教程:VI命令

注: /home/wwwroot/ftptest/tmall/web 就是 上传web应用 后的位置
修改server.xml
重启tomcat

/usr/local/tomcat7/bin/shutdown.sh
/usr/local/tomcat7/bin/startup.sh
重启
输入如下命令观察重启过程:

tail -300f /usr/local/tomcat7/logs/catalina.out

最后出现startup in xxxx ms就表示成功了
观察日志
步骤 4 :

访问公网地址

edit
访问公网地址:

http://47.104.95.212:8080/tmall


因为机器性能比较差,图片又比较大,访问起来略卡,也是正常现象啦
访问公网地址


HOW2J公众号,关注后实时获知最新的教程和优惠活动,谢谢。


问答区域    
2020-07-05 为什么在FTPRush里打不开Tomcat文件夹呢
Myself

如题




1 个答案

小小小小程序员
答案时间:2020-11-08
因为当时站长在设定FTPRUSH时,已经设定不能够访问其他文件夹



回答已经提交成功,正在审核。 请于 我的回答 处查看回答记录,谢谢
答案 或者 代码至少填写一项, 如果是自己有问题,请重新提问,否则站长有可能看不到




2020-03-05 为什么还会报这个异常,我哭了。。。。
bbsn




INFO: Starting Servlet Engine: Apache Tomcat/7.0.92 Mar 05, 2020 4:08:53 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /usr/local/tomcat7/apache-tomcat-7.0.92/webapps/tmall_ssm.war Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1082842932" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1064186113" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1513515434" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1113591108" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1976587292" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-4168288
加载中

							
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1513515434"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1113591108"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1976587292"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-416828864"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-861024361"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1251431165"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-995295988"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-330800704"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-2002147069"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-919626553"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1024426188"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1353628274"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1774926574"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1592923169"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-2264917"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-798505527"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1551130705"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-1641739893"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-595508764"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create-2038819744"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Druid-ConnectionPool-Create





回答已经提交成功,正在审核。 请于 我的回答 处查看回答记录,谢谢
答案 或者 代码至少填写一项, 如果是自己有问题,请重新提问,否则站长有可能看不到





2019-11-14 实在不明白为什么只有jsp文件也能跑起来
2019-09-02 java类呢!
2019-08-02 怎么样把公网IP和域名绑定?


提问太多,页面渲染太慢,为了加快渲染速度,本页最多只显示几条提问。还有 10 条以前的提问,请 点击查看

提问之前请登陆
提问已经提交成功,正在审核。 请于 我的提问 处查看提问记录,谢谢
关于 工具和中间件-部署到Linux-tomcat配置 的提问

尽量提供截图代码异常信息,有助于分析和解决问题。 也可进本站QQ群交流: 578362961
提问尽量提供完整的代码,环境描述,越是有利于问题的重现,您的问题越能更快得到解答。
对教程中代码有疑问,请提供是哪个步骤,哪一行有疑问,这样便于快速定位问题,提高问题得到解答的速度
在已经存在的几千个提问里,有相当大的比例,是因为使用了和站长不同版本的开发环境导致的,比如 jdk, eclpise, idea, mysql,tomcat 等等软件的版本不一致。
请使用和站长一样的版本,可以节约自己大量的学习时间。 站长把教学中用的软件版本整理了,都统一放在了这里, 方便大家下载: https://how2j.cn/k/helloworld/helloworld-version/1718.html

上传截图