<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%><%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 'index.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> <body> <java:useBean id="User" class="Student.Stu" scope="page"/> <h1>使用useBean动作创建Javabean的实例</h1> <br> 学生姓名:<%=User.getName() %><br> 学生年龄:<%=User.getAge() %><br> 学生专业:<%=User.getProject() %><br> </body></html>
1 回答
已采纳
大咪
TA贡献785条经验 获得超332个赞
Unknown tag (java:useBean)
这个意思就是说你这个标签不能被识别呀。。
<java:useBean id="User" class="Student.Stu" scope="page"/>//应该是jsp:吧 <jsp:useBean id="User" class="Student.Stu" scope="page"/>//这样试试
添加回答
举报
0/150
提交
取消