“inex.jsp”这个文件存在吗,是不是应该是"index.jsp"

解决方案 »

  1.   

    第一个问题是不是在于你把index.jsp给打错了  你打的是"inex.jsp"
    第二个问题要取决于你的代码,把你的代码贴出来吧
      

  2.   

    是这个路径下的index01.jsp
    http://localhost:8080/DefaultWebApp/index01.jsp代码如下:
    <%@ page contentType="text/html;charset=gb2312"%>    
    <%@ page import="java.sql.*"%> 
    <html>
    <body>
    <% 
    Class.forName("org.gjt.mm.mysql.Driver").newInstance(); 
    String url ="jdbc:mysql://localhost/hanbon_news?user=root&password=&useUnicode=true&characterEncoding=GB2312" ;
     
    //String url ="jdbc:mysql://localhost/db_name?user=yourusername&password=yourpassword&useUnicode=true&characterEncoding=GB2312" ;Connection conn= DriverManager.getConnection(url); 
    Statement stmt=conn.createStatement();
    String query="select field_name from table_name order by id";
    ResultSet rs=stmt.executeQuery(query);
    while(rs.next())
    {
            String s=rs.getString("field_name");//看准你的字段是不是字符型,不然就不能用getString,根据字段类使用getBoolean等等
            out.print(s+"<br>");
    }
    %>
    </body>
    </html>--------------------------------------------------------------------
    错误如下:
    HTTP Status 404 - /index01.jsp--------------------------------------------------------------------------------type Status reportmessage /index01.jspdescription The requested resource (/index01.jsp) is not available.
    --------------------------------------------------------------------------------Apache Tomcat/5.0.27
      

  3.   

    1. inex.jsp不存在,检查文件名是否正确,注意大小写
    2。你下载的程序初始化代码存在问题,可能需要环境的支持,要看好他的说明文件
      

  4.   

    inex.jsp不存在。包的位置不对(可能)!
      

  5.   

    是不是
    web.xml没配好呀!
      

  6.   

    把webapps\ROOT下的WEB-INF文件夹考到你自己的文件夹下