我感觉可能这儿有问题:
<jsp:useBean id="testbean" class="myBean.yangshi" scope="session" />
你的class指定的myBean.yangshi是个bean?只是猜测,楼主应该说明错误的原因,或是把错误贴出来。这样代码很难找错误的。呵呵
<jsp:useBean id="testbean" class="myBean.yangshi" scope="session" />
你的class指定的myBean.yangshi是个bean?只是猜测,楼主应该说明错误的原因,或是把错误贴出来。这样代码很难找错误的。呵呵
解决方案 »
- jsp中文路径问题
- 数据库不会写啊
- javabean 和java普通的类有什么去别啊,谁能说一下 啊
- JAVA存储jpg图片问题
- 急!关于<jsp:include>动作的问题!高手来 谢谢
- jsp+servlet+javabean网站中Resultset rs怎么传递?
- 求救!为了在xp sp2系统下能正常连接据库,我下个了SQL SP4的补丁!但不知道这个补丁要往里打!急求具体步骤,是高手的帮帮忙!
- java 文件操作问题,来看看吧 在线等
- 怎样用JSP、JAVABEAN读取文件init.ini中的内容
- extjs grid选中的数据在textfield显示
- jsp 页面转向问题
- CruiseControl与VSS整合碰到的问题
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">; <title>jsp教程 </title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<style type="text/css">
h1{ text-decoration: none; white-space: nowrap; padding-bottom: 10px; color:#66FF66; }
h1:hover { background: url('http://blog.sina.com.cn/pic/4723cdbf020002nm') repeat-x 100% 100%; }
h5{ text-decoration: NONE; color: #6633FF;}
h5:hover {font-weight: bold;color: #CC00FF;}
</style>
<script language="javascript">
<!--
function handle(){
var mousex;
var mousey;
mousex=window.event.x;
mousey=window.event.y;
keycon.style.left=mousex;
keycon.style.top=mousex;
}
document.onclick=handle;
-->
</script>
</head>
<BODY>
<link href="/styles.css" rel="stylesheet" type="text/css"> <p> </p>
<h1 align="center">
jsp教程 </h1>
<FORM method="post" action="usebean.jsp" name="form">
<h5>
What's your name?
<input type="text" name="Username"
size=20> <br> What's your e-mail address? <input type="text" name="Email"
SIZE="20" > <br> What's your age? <input type="password" name="Age"
size="4"> </h5>
<p>
<INPUT type="submit" name="submit" value="提交"> <input type="reset" name="reset" value="重置">
</p>
</FORM> <br> <div ID="keycon" style="position:absolute;top:128;left:128">
<img src="u=4028316861,3858036405&gp=-26.jpg"/>
</div>
</p>
<p> </p>
</body>
</html>
第二个为:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*" %>
<% request.setCharacterEncoding("gb2312");%>
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">; <title>jsp教程 </title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<style type="text/css">
h1{ text-decoration: none; white-space: nowrap; padding-bottom: 10px; color:#66FF66; }
h1:hover { background: url('http://blog.sina.com.cn/pic/4723cdbf020002nm') repeat-x 100% 100%; }
h5{ text-decoration: NONE; color: #6633FF;}
h5:hover {font-weight: bold;color: #CC00FF;}
</style>
<script language="javascript"> </script>
</head>
<BODY>
<link href="/styles.css" rel="stylesheet" type="text/css"> <p> </p>
<h1 align="center">
jsp初级教程 </h1>
<h5>
your name is: </h5>
<td>
<h5>
your age is:
</h5>
</td> <h5> <td>
</td>
<div ID="keycon" style="position:absolute;top:128;left:128">
<img src="u=4028316861,3858036405&gp=-26.jpg"/>
</div>
<body>
</body>
</html>这样有输出的