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

jsp页面空白 急啊
<%@   page   language= "java "   import= "java.util.* "   pageEncoding= "GB18030 "%>
<%
String   path   =   request.getContextPath();
String   basePath   =   request.getScheme()   +   ":// "
+   request.getServerName()   +   ": "   +   request.getServerPort()
+   path   +   "/ ";
%>

<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN ">
<html>
<head>
<base   href= " <%=basePath%> ">

<title> bottom </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 ">
-->
<style   type= "text/css ">
<!--
body   {
margin-left:   0px;
margin-top:   0px;
margin-right:   0px;
margin-bottom:   0px;
}
.STYLE1   {
color:   #FFFFFF;
font-weight:   bold;
}
-->
</style>
</head>

<body>
<table   width= "100% "   height= "44 "   border= "0 "   cellpadding= "0 "
cellspacing= "0 "   background= "images/bottom.jpg ">
<tr>
<td   align= "center "   style= "font-size:12px ">
<span   class= "STYLE1 "> &copy;   版权所有   </span>
</td>
</tr>
</table>
</body>
</html>


就这些代码
没别的了
但是就是JSP页面空白的
而一样模式的htm页面可以显示
郁闷的啊

------解决方案--------------------
base标记是一个基链接标记,是一个单标记。用以改变文件中所有连结标记的参数内定值。它只能应用于标记 <head> 与 </head> 之间。
你网页上的所有相对路径在链接时都将在前面加上基链接指向的地址。
href属性:设定前缀的链接地址