[jnhs]使用netbeans生成的webapp发布到tomcat是需要改名字的,不然就是404Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

2018-12-21更新

退出tomcat然后删除解压之后的文件夹,然后再启动tomcat也可以解决(安装版tomcat)

2018-12-9更新

有时候这样也可以解决

 

 第一次使用tomcat发布webapp 遇到404错误 

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


查了很多资料都没解决,后来发现是个一层窗户纸

打开tomcat的路径

再打开app管理器,找到我的app直接运行一下,看到地址栏的url,这才是真正的发布后的地址

 

这是发布之后,使用个服务器本地访问tomcat访问到的地址,为啥多了东西呢?

 

使用netbeans调试的时候的url

 

原因是

netbeans在生成war包的时候,重命名了

那么改一下,现在让部署后的工程还是原来的名字

先停止tomcat

给war包改名

在运行tomcat

使用ddns访问成功

 

posted @ 2018-11-29 09:33  不打鱼光晒网  阅读(782)  评论(0编辑  收藏  举报