clarionx
clarionx

Reputation: 11

Why is Jsp parsing "<="?

I have the following code in a jsp:

<div ng-show="controller.var1 <= 1 && controller.var2 > 0">

The output is:

<div ng-show="controller.var1  0">

I know "<%" and friends are special JSP syntax, but I've never seen "<=" have an impact before. It doesn't matter where I put a "<=" in the page - everything after it is ignored up to and including the next ">"

Any ideas what might be going on? I'm baffled.

Upvotes: 1

Views: 41

Answers (1)

evanwong
evanwong

Reputation: 5134

<= is not a JSP scriplet or expression.

<= 1 && controller.var2 > (this <> block is conflicted with the html tags now since it is not evaluated by JSP) is "ignored" by your browser or AngularJS (since there is ng-show, I guess you are using AngularJS) rendering.

That is why the output is controller.var1 and 0.

Upvotes: 1

Related Questions