Super Hornet
Super Hornet

Reputation: 2907

Syntax error on token ";", Expression expected after this token in JSP

I'm using this Code in my jsp:

<c:if test="<%=box.getPrefs().getBool("PrefOTPEnabled")%>">
        <div class="ChOptPadd_r11 padd_t2">
            <div class="link">

            </div>
        </div>
</c:if>

but I got a syntax error: Syntax error on token ";", Expression expected after this token

What is wrong with that?

Upvotes: 1

Views: 2240

Answers (2)

sunysen
sunysen

Reputation: 2361

    <% if (box.getPrefs().getBool("PrefOTPEnabled")){%> 

        <div class="ChOptPadd_r11 padd_t2">
            <div class="link">

            </div>
        </div>
    <%}%> 

Upvotes: 0

Ken de Guzman
Ken de Guzman

Reputation: 2820

Because you have double quotes. It should be apostrophe in 'PrefOTPEnabled'.

<c:if test="<%=box.getPrefs().getBool('PrefOTPEnabled')%>">
        <div class="ChOptPadd_r11 padd_t2">
            <div class="link">

            </div>
        </div>
</c:if>

Upvotes: 1

Related Questions