日期:2014-05-17  浏览次数:20603 次

【菜鸟提问】request.getContextPath() 问题
本帖最后由 Android620 于 2013-03-17 10:39:06 编辑
jsp文件中是这么写的

<FRAMESET rows="12%,88%"  framespacing="1" cols="*" >
 <FRAME name="topframe" src="<%=request.getContextPath()%>/top.jsp" noresize scrolling="no" >
<frameset id="menu" cols="18%,1%,81%">
<frame noresize src="<%=request.getContextPath()%>/systemManage/functionAction!getFunctionMenuByUser.action?syhid=<%=syhid %>&orgId=<%=orgId %>&usernameCn=<%=usernameCn %>" frameborder="0" scrolling="auto" >
<frame noresize name="arrowframe" id="arrowframe" src="<%=request.getContextPath()%>/arrow.jsp" scrolling="no" frameborder="0">
<frame noresize frameborder="0" scrolling=auto name="platform" src="<%=request.getContextPath()%>/mesige.jsp">
</frameset>
</frameset>


【菜鸟提问】为什么在Eclipse里面打开这个jsp文件时,会提示:
The file /E:/workspace/xxxWebsite/WebRoot/<%=getContextPath()%>/top.jsp cannot be found. .....
我的文件是存在的呀,路径也没错。。。
这算是错误嘛,还是正常的?

------解决方案--------------------
http://blog.sina.com.cn/s/blog_6b18a9110100l641.html
参考下,是不是jsp文件打开方式有问题
------解决方案--------------------
不过这样就没法在MyEclipse中预览jsp网页了哦
可否两全其美?
--------------------
纳,我也想知道,顶起。。。