1.用tomcat启动项目之后,访问应用时,在url的最后一般要加上项目的名字,如下图的exam。
2.如果想去掉url后面的exam,直接通过域名http://yumin:8080访问应用,可以编辑server.xml文件,在
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
Host后加
<Context docBase="../webapps/yumin" path="" reloadable="false" />