为什么用不能显示页面,只显示空白页啊?

miranda_08 2009-02-19 05:25:18
<%@ page language="java" pageEncoding="GBK"
contentType="text/html; charset=GBK"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>

<html:html>
<head>
<html:base />

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->

</head>


<body>
<div>
<jsp:include page="index_ec.jsp" />
</div>
</body>
</html:html>
...全文
563 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuwei149 2009-06-06
  • 打赏
  • 举报
回复
那个flush=true到底是有什么用的啊
zhoulijian 2009-06-06
  • 打赏
  • 举报
回复
我觉得你在index_ec.jsp这个页面中不要包括头尾了。
因为你把index_ec.jsp加载到另外一个页面,那个页面有头跟尾了,不知道我这样理解对不对。你可以试一下,因为我以前也碰到过。
还有就是你加载的页面路径错误。检查一下。
robyjeffding 2009-06-06
  • 打赏
  • 举报
回复
你要包含的页面index_ec.jsp是在myjsp.jsp同一目录下吗?如果不是,就要视index_ec.jsp这个文件具体的路径而定
chen105315 2009-06-06
  • 打赏
  • 举报
回复
应该是路劲的问题吧!!!
genglily 2009-06-06
  • 打赏
  • 举报
回复
恩,我也出现这个问题了,好像不能解决唉
ouyangxiaokang6 2009-02-19
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 zhangpeixv 的回复:]
加一个属性 <jsp:include page="index_ec.jsp" flush="true"/>
印象是这个啊
呵呵
[/Quote]
恩,right
zhangpeixv 2009-02-19
  • 打赏
  • 举报
回复
加一个属性<jsp:include page="index_ec.jsp" flush="true"/>
印象是这个啊
呵呵
timber85zh_01 2009-02-19
  • 打赏
  • 举报
回复
肯定路径写错了被 加个/ 或者写全看看吧
zfl110 2009-02-19
  • 打赏
  • 举报
回复
用绝对路径看

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧