0

i try to get the information of a user on my database, store the object in a session then show the session's contents on a JSP page. Whenever I try to show it on my page, the content of the session does not appear. Please help.

THIS IS THE JSP PAGE I WAS TALKING ABOUT:

 <%@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(); %> &nbsp;&nbsp; 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>

Is there something missing here that I need to put? :)

user3418987
  • 137
  • 2
  • 7
  • 16
  • What happens instead? Why the hell are you using scriptlets instezd of the JSP EL and the JSTL? Read http://stackoverflow.com/questions/2188706/how-to-avoid-using-scriptlets-in-my-jsp-page. Scriptlets shouldn't be used, and that's true for 15 years. – JB Nizet Mar 21 '14 at 14:06
  • Use of scriptlet in JSP has been long deprecated. EL (expression language) and JSTL tags is highly recommended. Please refer this [link](http://www.java2s.com/Tutorial/Java/0380__JSTL/ViewSessionDateusingJSTL.htm) – Tajinder Singh Mar 21 '14 at 14:23

0 Answers0