前台路径:出现在jsp中,参照路径为当前web服务器的根
后台路径:出现在java类或者xml中,参照路径为web应用的根路径
不以"/"开头的路径,其参照路径是当前访问路径(除最后资源名称外的路径)
<img alt="pics" src="/images/3beauty.jpg">
这个路径出现在jsp中,所以是前台路径,而前台路径的参照路径是:当前web服务器的根路径:http://localhost:8080
则其绝对路径是:http://localhost:8080/images/3beauty.jpg
<bean name="/my.do" class="com.bjpowernode.handlers.MyController"/>`
这个路径出现在xml文件中,所以是后台路径,而后台路径的参照路径是web应用的根路径:http://localhost:8080/06-requestPath
则其绝对路径是:参照路径+相对路径
http://localhost:8080/06-requestPath/my.do
<img alt="pics" src="images/2beauty.jpg">
当前路径是不以"/"开头的相对路径,其参照路径是当前访问路径http://localhost:8080/07-requestPath-2/
其提交的绝对路径是:http://localhost:8080/07-requestPath-2/images/3beauty.jpg