用Tomcat服务器,访问地址:
http://localhost:8080/www
在web目录下有几个文件夹,menu_1,menu_2,share
在menu_1下的jsp文件如引用 menu_2或 share下的文家、图片什么的,必须要在前面加上
/www或者 <%=request.getContextPath()%>,不然路径不对,必须要写绝对路径,这样很麻烦,高手看有没有解决的办法,非常感谢!!!
在 server.xml中配置了
<Context path= "/www " docBase= "D:\www " debug= "true " reloadable= "true "/ >
在JSP文件中必须这样应用路径:
<link href= " <%=request.getContextPath() % >/share/share.css " rel= "stylesheet " type= "text/css " >
。
<img src= " <%=request.getContextPath() % >/share/share_images/ico_01.gif " width= "21 " height= "16 " / >
share 目录在根目录 www下,能不能不加前面的 <%=request.getContextPath() % >?
高手帮帮忙阿!!!!
http://localhost:8080/www
在web目录下有几个文件夹,menu_1,menu_2,share
在menu_1下的jsp文件如引用 menu_2或 share下的文家、图片什么的,必须要在前面加上
/www或者 <%=request.getContextPath()%>,不然路径不对,必须要写绝对路径,这样很麻烦,高手看有没有解决的办法,非常感谢!!!
在 server.xml中配置了
<Context path= "/www " docBase= "D:\www " debug= "true " reloadable= "true "/ >
在JSP文件中必须这样应用路径:
<link href= " <%=request.getContextPath() % >/share/share.css " rel= "stylesheet " type= "text/css " >
。
<img src= " <%=request.getContextPath() % >/share/share_images/ico_01.gif " width= "21 " height= "16 " / >
share 目录在根目录 www下,能不能不加前面的 <%=request.getContextPath() % >?
高手帮帮忙阿!!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货