jsp中,引用文件夹外图片出现bug?
在news.jsp中,我通过 <img border="0" src="../bg1.png">引用bg1.png,在myeclipse的design里显示还好好的,但在浏览器调试时,图片就没了,破损的样子。当我把<%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>和<base href="<%=basePath%>">删掉时,图片显示正常,但<%@include file="../navigation.jsp" %>就不能正常显示了。这是怎么回事?怎么办?我想知道,在web项目里大家分文件夹后(把所有jsp都放一块,不好吧?),大家是怎样引用东西的?暂时只有五个金币,穷。我把前面那段换为<%String path = request.getContextPath();String basePath =request.getScheme()+":⼀⼀"+request.getServerName()+":"+ request.getServerPort()+path+"⼀"+"news⼀";%>图片又能正常加载了,但<%@include file="..⼀navigation.jsp" %>又不能正常显示了。