您的位置:程序门 -> java -> web 开发



jsp页面空白 急啊


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


jsp页面空白 急啊
发表于:2007-05-22 16:44:05 楼主
<%@   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页面可以显示
郁闷的啊
发表于:2007-05-22 16:46:331楼 得分:0
gbk编码改成gbk也没用的
疯了
发表于:2007-05-22 16:47:532楼 得分:0
我试了一把:
将 <span   class= "style1 "> 和 </span> 删除就可以输出&copy;   版权所有
发表于:2007-05-22 16:48:423楼 得分:0
是的啊  
就是图片什么的都显示不出来的

发表于:2007-05-22 16:50:574楼 得分:0
该回复于2007-12-28 11:42:56被管理员或版主删除
发表于:2007-05-22 16:53:055楼 得分:0
lz检查一下图片路径,我机器上可以显示。
发表于:2007-05-22 16:55:206楼 得分:0
.style1   {
color:   #ffffff;
font-weight:   bold;
}

你把样式表设置成白色,当然显示不出信息了……
其实应当是显示出来了,看不出效果
至于图片显示不出来。,应当是路径不对……
发表于:2007-05-22 16:58:367楼 得分:0
bl_long1()   兄弟说的对呀,我还没注意lz的css   color:   #ffffff;改成其他颜色。
发表于:2007-05-22 17:01:208楼 得分:0
up
发表于:2007-05-22 17:05:079楼 得分:0
背景是蓝色的啊

白色的字能显示的
发表于:2007-05-22 17:06:5810楼 得分:0
倒了倒了


<%
string   path   =   request.getcontextpath();
string   basepath   =   request.getscheme()   +   ":// "
+   request.getservername()   +   ": "   +   request.getserverport()
+   path   +   "/ ";
%>

<base   href= " <%=basepath%> ">


把这两个去掉就好显示了


这是为什么啊
发表于:2007-05-22 17:11:5311楼 得分:0
有点明白

这个自动生成的是取得站台的根目录

而我此是要取的是相对目录的
发表于:2007-05-22 17:11:5412楼 得分:0
base标记是一个基链接标记,是一个单标记。用以改变文件中所有连结标记的参数内定值。它只能应用于标记 <head> 与 </head> 之间。
你网页上的所有相对路径在链接时都将在前面加上基链接指向的地址。  
href属性:设定前缀的链接地址
发表于:2007-05-22 17:17:1313楼 得分:0
解释的很详细

到底有咖啡喝的  
不错不错


快速检索

最新资讯
热门点击