[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.

 第一次使用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访问成功

猜你喜欢

转载自www.cnblogs.com/jnhs/p/10036359.html