jsp 页面无法启动,既启动以后导航栏只有地址却不显示,MyEclipse



```index.jsp
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@page import="util.Info"%>
<%@page import="dao.CommDAO"%>
<%@page import="util.PageManager"%>
<html>
<head>
<title>数据结构算法学习平台</title><LINK href="qtimages/style.css" type=text/css rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"><%@ include file="qttop.jsp"%></td>
  </tr>
  <tr>
    <td><table width="974" height="964" border="0" align="center" cellpadding="0" cellspacing="0" id="__01">

      <tr>
        <td height="856"><table id="__01" width="974" height="856" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td valign="top"><%@ include file="qtleft.jsp"%></td>
            <td valign="top"><table id="__01" width="700" height="856" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td><table id="__01" width="700" height="295" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="700" height="45" background="qtimages/1_02_02_01_01.gif"><table width="100%" height="26" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="17%" align="center" valign="middle"><a href="news.jsp?lb=校内新闻"><span class="STYLE3">校内新闻</span></a></td>
                        <td width="83%">&nbsp;</td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td><table id="__01" width="700" height="235" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td><img src="qtimages/1_02_02_01_02_01.gif" width="12" height="235" alt=""></td>
                        <td width="436" height="235" valign="top" bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="newsline">
                          <%

    for(HashMap map:new CommDAO().select("select * from xinwentongzhi where leibie='校内新闻' order by id desc ",1,9)){

     %>
                          <tr height="25">
                            <td width="16" align="center" class="newslist"><img src="qtimages/1.jpg" /></td>
                            <td width="374"  class="newslist"><a href="gg_detail.jsp?id=<%=map.get("id")%>"><%=Info.ensubStr(map.get("biaoti"),24)%></a></td>
                            <td width="76" align="center" class="newslist"><%=map.get("addtime").toString().substring(0,10) %></td>
                          </tr>
                          <%
                            }
                            %>
                        </table></td>
                        <td width="252" height="235" align="center" background="qtimages/1_02_02_01_02_03.gif">
                        <%=new CommDAO().DynamicImage("",6,240,215) %></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td><img src="qtimages/1_02_02_01_03.gif" width="700" height="15" alt=""></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><table id="__01" width="700" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="700" height="42" background="qtimages/1_02_02_02_01.gif"><table width="100%" height="26" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="17%" align="center" valign="middle"><span class="STYLE3">学生风采</span></td>
                        <td width="83%">&nbsp;</td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td><table id="__01" width="700" height="170" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td width="12" background="qtimages/1_02_02_02_02_01.gif">&nbsp;</td>
                        <td width="680" height="170" bgcolor="#FFFFFF">

                        <div id=demo style="overflow:hidden;width:680;" align=center>
    <table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 >
        <tr><td valign=top  id=marquePic1 ><table width='680' border='0' cellspacing='0'><tr>
        <%
        for(HashMap m:new CommDAO().select("select * from xueshengzhuce order by id desc",1,8){
         %>
        <td align=center width="190"><a href="xueshengzhucedetail.jsp?id=<%=m.get("id") %>" target=""><img src="<%=m.get("zhaopian") %>" width=135 height=140 border=0><br>
          <br><%=m.get("xueshengxingming") %></a></td>
          <%} %>


        </tr></table>
        </td><td id=marquePic2 valign=top></td></tr>
    </table></div>
<script type="text/javascript">
var speed=50 
marquePic2.innerHTML=marquePic1.innerHTML 
function Marquee(){ 
if(demo.scrollLeft>=marquePic1.scrollWidth){ 
demo.scrollLeft=0 
}else{ 
demo.scrollLeft++ 
} 
} 
var MyMar=setInterval(Marquee,speed) 
demo.onmouseover=function() {clearInterval(MyMar)} 
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
</script>
</td>
                        <td width="8" background="qtimages/1_02_02_02_02_03.gif">&nbsp;</td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td><img src="qtimages/1_02_02_02_03.gif" width="700" height="14" alt=""></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><table id="__01" width="700" height="240" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="700" height="42" background="qtimages/1_02_02_02_01.gif"><table width="100%" height="26" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="17%" align="center" valign="middle"><a href="news.jsp?lb=实时快报"><span class="STYLE3">实时快报</span></a></td>


                          <td width="36%">&nbsp;</td>
                          <td width="47%"><a href="news.jsp?lb=热点资讯"><span class="STYLE3">热点资讯</span></a></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td><table id="__01" width="700" height="184" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="12" background="qtimages/1_02_02_02_02_01.gif">&nbsp;</td>
                          <td width="680" height="265" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td width="50%" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="newsline">
                                <%

    for(HashMap map:new CommDAO().select("select * from xinwentongzhi where leibie='实时快报' order by id desc ",1,11)){

     %>
                                <tr height="25">
                                  <td width="16" align="center" class="newslist"><img src="qtimages/1.jpg" /></td>
                                  <td width="374"  class="newslist"><a href="gg_detail.jsp?id=<%=map.get("id")%>"><%=Info.ensubStr(map.get("biaoti"),24)%></a></td>
                                </tr>
                                <%
                            }
                            %>
                              </table></td>
                              <td width="1%">&nbsp;</td>
                              <td width="49%" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="newsline">
                                <%

    for(HashMap map:new CommDAO().select("select * from xinwentongzhi where leibie='热点资讯' order by id desc ",1,11)){

     %>
                                <tr height="25">
                                  <td width="16" align="center" class="newslist"><img src="qtimages/1.jpg" /></td>
                                  <td width="374"  class="newslist"><a href="gg_detail.jsp?id=<%=map.get("id")%>"><%=Info.ensubStr(map.get("biaoti"),24)%></a></td>
                                </tr>

                            }

                              </table></td>
                            </tr>
                          </table></td>
                          <td width="8" background="qtimages/1_02_02_02_02_03.gif">&nbsp;</td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td><img src="qtimages/1_02_02_02_03.gif" width="700" height="14" alt=""></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="108"><%@ include file="qtdown.jsp"%></td>
      </tr>
    </table></td>
  </tr>

</table>
</body>
</html>

qtleft.jsp

1个回答

建议:
1、提问的时候,贴代码要选择“代码片”,这样代码就能以原样显示了,否则就会被解析成 html 元素,看到的就是混乱的排版。
2、排查问题,项目启动的控制台有没有错误信息,如果 tomcat 正确启动了,控制台不会有异常信息的;其次,用浏览器访问,而不是用 MyEclipse 内置的浏览器,
然后 F 12 看看浏览器页面上有没有错误提示。

oiuhp
oiuhp 这个项目框的 我不是很懂,我下载了CSDN里面的jsp 项目 遇到和原项目一样的问题,及 拿别人 提交成功的项目测试,基本如此
5 个月之前 回复
oiuhp
oiuhp 我一开始以为是数据库的问题, 但是当我删掉其中代码 功能 的以后 网页就出现了,都是 带<%这个符号 或者 <%{%>,,,,有的是其它 包的连接不显示网页导致一起不显示 ,但是跳转到哪个页面还是<%这个符号的
5 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问