tomcat 去掉项目名后,还可以用项目名

在server.xml添加以下代码:

<Context path="/" docBase="../webapps/jeeplus/" reloadable="true" crossContext="true" /> 

在去掉jeeplus项目名后,就可以直接http://localhost:8081/selectAll,而不用http://localhost:8081/
jeeplus/selectAll
可是,如果,你的controller文件路径和项目名一样的话,

你用http://localhost:8081/jeeplus/方法名,却找不到,必须用http://localhost:8081/jeeplus/jeeplus/方法名。

这样搞的我好郁闷,只能去修改controller路径了

 


 

posted @ 2018-09-15 16:36  会飞的鱼9999  阅读(190)  评论(0编辑  收藏  举报