السلام ليكم
عند تنفيذ برنامج بسيط يقوم باخد مدخلات من من صفحة html وتخزينها فى كلاس بيينز ثم عرضها تكون القيم المعروضة null
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
TODO write content
<form name="fr" method="POST" action="login.jsp">
<input type="text" name="name" value="" />
<input type="text" name="password" value="" />
<input type="submit" value="summit" />
</form>
</body>
</html>دااااااااااااااااااااااااا ال كلاس البينز
package test;
public class been {
String name;
String password;
public void setname(String x){
this.name=x;
}
public String getname(){
return this.name;
}
public void setpassword(String x){
this.password=x;
}
public String getpassword(){
return this.password;
}
}ودااااااااااااا ال jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="test.been" %>
<jsp:useBean id="b1" class="test.been" scope="session">
</jsp:useBean>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<% out.print(session.getAttribute("password"));
out.print(session.getAttribute("name"));
%>
</body>
</html>