-
JSP Sucks
honestly, I think so..i was able to learn PHP last summer because it was so beginner friendly..but now I have a true Enemy of Mine..J bloody SP
if you're a jsp programmer..do you know why
<c:when> or <c:if>
always seem evaluates to true? to solve the issue i had to use an otherwise tag..which forced me to have multiple choose tags because i can't have if else if and else..
To elaborate I was trying to do some simple validation
if a parameter is empty set this variable to this.so
Code:
<c:if test="${empty param.fname}">
<c:set var="error" value="Please enter first name"/>
</c:if>
Except even though fname is not empty..it will set error variable to "Please enter first name"..Why on earth is that happening? :S
If you can clear this dark cloud up, I will appreciate it..Thanks.
-
Funny, that should work. Did you try tracing out the value of param.fname before it enters the if block?
-
unfortunately...i am not sure how to debug jsp