1

I want to use my session variable to display the name of user in each JSP page using JSTL. I already import the JSLT librarie in my netbeans project by i have an error in compilation.

My code :

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>    
<div class="container">
    <div class="panel panel-default">
        <c:if test = "${ !empty sessionScope.prenom && !empty sessionScope.nom }">
            <div class="panel-heading">Bienvenu ${sessionScope.prenom} ${sessionScope.nom} !</div>
        </c:if>
    </div>
</div>

I got this error :

According to TLD or attribute directive in tag file, attribute test doesn't accept any expressions

What can i do to resolve it ?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Jean-Paul
  • 127
  • 2
  • 15

1 Answers1

0

I think your condition in test is wrong.can you provide screenshot for error. Try by adding following directive.

<%@ taglib
prefix="c"
uri="http://java.sun.com/jsp/jstl/core" 
%>
kiranbirajdar
  • 195
  • 2
  • 12