日期:2014-05-18  浏览次数:20768 次

jsp include 动态文件名问题
<jsp:include   page= "/dir/2_20070307013331765.htm "   flush= "true "   />  
这样是可以显示的
但是
<%
String   tempstr= "/dir/2_20070307013331765.htm "

%>
<jsp:include   page= "tempstr "   flush= "true "   />  
为什么不可以显示?

------解决方案--------------------
<jsp:include page= "tempstr " flush= "true " /> 应该改成:
<jsp:include page= " <%=tempstr%> " flush= "true " />
------解决方案--------------------
<jsp:include page= "tempstr " flush= "true " />
改成
<jsp:include page= " <%=tempstr%> " flush= "true " />
看看
------解决方案--------------------
String tempstr= "/dir/2_20070307013331765.htm "
这个后面没有分号
------解决方案--------------------
例如:C:\Tomcat 5.0\work\Catalina\localhost在这个目录下找到你的web工程的文件夹里就应该能找到了。找到了看一下相应的语句。
------解决方案--------------------
你右键查看源代码看看你的那个连接是否正确