javaweb 根路径有关问题

javaweb 根路径问题我用html做页面,form表单地址栏写action/xxAction.do时候地址栏会变为http://localh

javaweb 根路径问题
我用html做页面,form表单地址栏写action="/xxAction.do"时候地址栏会变为
http://localhost:8080/xxAction.do.

我想要的是带上项目名的地址,应该怎么做?
就是要这种效果
http://localhost:8080/projectname/xxAction.do