0

I know it must be a very simple question. but after two hours of checking i still dont get any idea why i cant print result. IntelIJ don`t recognise println / or any other print/ after out.

Please help.

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>registerSuccess</title>
</head>
<body>
<select>
    <%
    String name = (String) session.getAttribute("Customer.name");
    String email = (String) session.getAttribute("Customer.email");
    String phoneNr = (String) session.getAttribute("Customer.phoneNR");

    out.println(name);
%>

</select>

</body>
</html>

1 Answers1

1

The select tag defines a dropdown of options which you haven't defined yet. Assuming name isn't empty or null, you can modify your out.println to the following to display your value:

out.println("<option value='name'>" + name + "</option>");
Austin Yi
  • 61
  • 3