这一句 <jsp:useBean id= "aaa " class= "Bean.sampleBean "/> 为什么老是 "aaa "警告诉信息出现
------解决方案--------------------
class 里面是你的类吗?似乎你标志的不是个类文件啊
------解决方案--------------------
包名最好是要按照规定来写啊。小写啊,养成好的习惯然后会减少出现莫名其妙的问题的。
------解决方案--------------------
<%@ page import= "java2.CarBean " %>
<%@ page contentType= "text/html; charset=gb2312 "%>
<html>
<head>
<title> 使用一个JavaBean </title>
</head>
<body>
<h2> 使用一个 JavaBean </h2>
<jsp:useBean id= "myCar " class= "CarBean "/>
我有一辆 <jsp:getProperty name= "myCar " property= "maker " /> </br>
<jsp:setProperty name= "myCar " property= "maker " value= "Ferrari "/>
现在我有一辆 <jsp:getProperty name= "myCar " property= "maker " />
</body>
</html>
异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: /CarBean1.jsp(9,0) The value for the useBean class attribute CarBean is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1227)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3272)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.
常
代码迷推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.daimami.com/search?q=317