帮忙找个错误。急!

peter_su 2007-06-25 04:20:37
报错如下:
Servlet.service() for servlet action threw exception
javax.servlet.jsp.JspException: Cannot find bean source in any scope
我jsp页面代码只要加上<html:```>tag就会报上面的错误.
jsp code:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
prefix="logic"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ page contentType="text/html; charset=gb2312" language="java"
import="java.sql.*" errorPage=""%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>
Home Page
</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" href="css/mm_spa.css" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #330099;
}
.STYLE2 {color: #FFFFFF}
-->
</style>
</head>
<body background=" img/mm_bg_red.gif">
<img src=" mm_spacer.gif" alt="" width="50" height="1" border="0" />
<table border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#220103">
<td rowspan="2" colspan="2" nowrap="nowrap">
<img src=" img/mm_spa_photo1.jpg" alt="Header image" width="215"
height="108" border="0" />
</td>
<td colspan="2" height="55" nowrap="nowrap" id="logo" valign="bottom">
Quality is the only way to survive and prosper
</td>
<td width="283" rowspan="2">
<img src=" img/achievo_logo.gif" alt="header image 2" width="180"
height="84" border="0" />
</td>
<td width="7" rowspan="2">   </td>
</tr>

<tr bgcolor="#220103">
<td height="54" colspan="2" nowrap="nowrap" id="tagline" valign="top">
 
</td>
</tr>

<tr bgcolor="#FF9900">
<td colspan="6"><img src=" img/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>

<tr bgcolor="#FF080E">
<td colspan="6"><img src=" img/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>

<tr bgcolor="#FF9900">
<td colspan="6"><img src=" img/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>

<tr bgcolor="#FF080E">
<td colspan="5" bgcolor="#FF0000"><a href="home.html" target="_top"><img src="../img/mm_spacer.gif" alt="" width="1" height="18" border="0" /></a>
td>
<td bgcolor="#FF0000"> </td>
</tr>


</td>
<td width="67"> </td>
<td width="429" valign="top"><img src="img/mm_spacer.gif" alt="" width="305" height="1" border="0" /><br />
 <br />
 <br />

<table width="414" height="85" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFCC00">
<tr>
<td width="170" class="pageName"> </td>
</tr>

<tr>
<td height="30" class="bodyText" colspan="3">
<div align="center">
<h1>
<li>
<bean:message key="knowlegeshare.tile.knowlegeshare" />
</li>
</h1>
</div>
</td>
</tr>
<tr>
<td height="24" colspan="3" class="bodyText">
<div align="center">
<h3 align="center"><bean:message key="knowlegeshare.lable.type"/><%--:
<html:select property="filetype">
<logic:iterate id="TYPE_NAME" name="TypeNameSupply">
<option
value='<bean:write name="TYPE_NAME" property="value"/>'>
<bean:write name="TYPE_NAME" property="value" />
</option>
</logic:iterate>
</html:select>
--%><html:text name="source" property="source"></html:text><%--
<input type="submit" name="Submit" value='<bean:message key="knowlegeshare.button.search"/>' />
--%></h3>
</div>
</td>
</tr>
<tr>
<td height="31" colspan="3" class="bodyText"><h2><li><div align="center"><a href="ResourceUpload.html">我要上传资料</a></div>
</li></h2> <div align="center"></div> <div align="center"></div></td>
</tr>
</table>
</td>
<td width="40"> </td>
<td width="283" valign="top"><img src=" img/mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
<td width="7"> </td>
</tr>
<tr>
<td width="160"> </td>
<td width="67"> </td>
<td width="429"> </td>
<td width="40"> </td>
<td width="283"> </td>
<td width="7"> </td>
</tr>
</table>
</body>
</html>
...全文
249 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
qbquan 2007-06-26
  • 打赏
  • 举报
回复
是不是标签库没导进去?
使用本地的看看
Blueion 2007-06-26
  • 打赏
  • 举报
回复
你的web.xml配置好了么
tdy1234 2007-06-26
  • 打赏
  • 举报
回复
要看看 后台才知道
oukan 2007-06-26
  • 打赏
  • 举报
回复
你的后台怎么写的
在session中保存了“source”吗
nmjj2006 2007-06-26
  • 打赏
  • 举报
回复
javax.servlet.jsp.JspException: Cannot find bean source in any scope
错误是说你指定的BEAN在你所指定的共享区域找不到
也就是你在使用STRUTS标签时候如果你在session 而用的时候把对象存在了request上 这样就会报这个错
stevenzxl 2007-06-26
  • 打赏
  • 举报
回复
用什么框架做的,导.jar包了吗?用的myeclipse插件?
好长的代码啊,能把错误信息发上来不?

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧