我尝试在我的数据库中获取用户的信息,将对象存储在会话中,然后在JSP页面上显示会话的内容。每当我尝试在我的页面上显示它时,会话的内容都不会出现。请帮忙。
这是我正在谈论的JSP页面:
<%@page import="neospa.Client"%>
<%@page import="DAOs.ClientDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CLIENT INFORMATION</title>
</head>
<body>
<h1>CLIENT INFORMATION</h1>
<br>
<%Client client = (Client)session.getAttribute("Client");%>
First Name <% client.getFname(); %> Last Name <% client.getLname();%>
<br>
Birthday <%client.getBirthday();%>
<br>
Home Number <%client.getHomeno();%>
<br>
Mobile Number <%client.getMobileno();%>
<br>
Office Number <%client.getOfficeno();%>
<br>
Email Address <%client.getEmail();%>
<br>
Address: <%client.getAddress();%>,<%client.getCity();%>,<%client.getRegion();%>,<%client.getCountry();%>
</body>
</html>
我需要放置一些东西吗? :)