当前位置: 代码迷 >> Java Web开发 >> The value for the useBean class attribute com.firm.Firm is invalid,该怎么处理
  详细解决方案

The value for the useBean class attribute com.firm.Firm is invalid,该怎么处理

热度:376   发布时间:2016-04-17 13:59:19.0
The value for the useBean class attribute com.firm.Firm is invalid
<%@   page   language= "java "   contentType= "text/html;charset=GB2312 "%>
<%@   page   import= "java.sql.* "%>
<%@   page   import= "com.firm.Firm "%>

<html>
<head>
<title> Insert   title   here </title>
</head>
<body>
<jsp:useBean   id= "addBean "   scope= "page "   class= "com.firm.Firm   "/>
<%
String   name   =   new   String(request.getParameter( "name ").getBytes( "8859_1 "));
String   emote   =   new   String(request.getParameter( "emote ").getBytes( "8859_1 "));
String   content   =   new   String(request.getParameter( "content ").getBytes( "8859_1 "));
String   strsql   =   "insert   into   guestbook   (name,emote,content)   values   ( ' "   +   name   +   " ', ' "   +   emote   + " ', ' "   +   content   +   " ') ";
addBean.executeUpdate(strsql);
out.print( "您的留言已经保存到数据库中,谢谢! ");
%>
</body>
</html>

老是提示说org.apache.jasper.JasperException:   /ok_guest.jsp(18,0)   The   value   for   the   useBean   class   attribute   com.firm.Firm     is   invalid.

而且Firm.class也是放在   WEB-INF\classes\com\firm   下的

------解决方案--------------------
你引这个类包时能不能改成com.firm.*?

改完了以后试试
  相关解决方案