标题:jsp页面出现错误
只看楼主
cai410579517
Rank: 3Rank: 3
来 自:宁德
等 级:论坛游侠
威 望:6
帖 子:128
专家分:179
注 册:2013-8-18
结帖率:88%
已结贴  问题点数:5 回复次数:3 
jsp页面出现错误
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@page import="com.beao.Entity"%>

<%@page import="javax.ejb.EntityBean"%>
<%
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>My JSP 'Myproduct.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>
  
  <style>
  #sel
  {
      background-color:#D4D4D4;
      font-size:14px;
      background-repeat:no-repeat;
  }
  </style>
  <body>
  <form method="post" action="">
   <table id="sel" border="0"  width="100%" height="auto">
   <%ArrayList<Entity> list= new ArrayList<Entity>();
    Entity e= new Entity();%>
   <%
   for(int i=0;i<list.size();i++){
  Entity en= list.get(i);
   %>
   <tr>
   <td align="center">产品编号</td>
   <td align="center">产品名称</td>
   <td align="center">产品说明</td>
   <td align="center">产品价格</td>
   <td>操作</td>
   </tr>
   <tr>
   <td><%=i+1%></td>
   <td><%=e.getProname()%></td>
   <td><%=e.getProexplain() %>></td>
   <td><%=e.getProprice() %></td>
   <td><a href="#">增加</a> <a href="#">删除</a> <a href="#">修改</a></td>
   
   </tr>
   <% }%>
   </table>
   </form>
  </body>
</html>
大家看看我这里那里错了  指点下 tomcat 访问 出现
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception
org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:156)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)



root cause
org.apache.jasper.JasperException: Unable to load class for JSP
    org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:630)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)



root cause
java.lang.ClassNotFoundException: org.apache.jsp.Myproduct_jsp
    (URLClassLoader.java:200)
    java.security.AccessController.doPrivileged(Native Method)
    (URLClassLoader.java:188)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
    org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:628)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


搜索更多相关主题的帖子: starting PUBLIC import title java 
2013-08-18 22:19
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:396
帖 子:11713
专家分:43267
注 册:2006-5-13
得分:5 
系统提示出错时会给出错误的行号及出错的代码啊。

活到老,学到老! http://www. E-mail:hu-jj@
2013-08-19 07:28
cai410579517
Rank: 3Rank: 3
来 自:宁德
等 级:论坛游侠
威 望:6
帖 子:128
专家分:179
注 册:2013-8-18
得分:0 
回复 2楼 hu9jj
我找到错误了是在数据层引发出来的 连接池错误
 
2013-08-19 18:36
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:396
帖 子:11713
专家分:43267
注 册:2006-5-13
得分:0 
解决了就好

活到老,学到老! http://www. E-mail:hu-jj@
2013-08-20 07:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-419340-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.529505 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved