Can someone tell me how I could incorporate if condition in the following? At this point I have: <cut value="${param.TO6}"/>-<cut value="${param.TO7}"/>
It works and I get "-" in the web page no matter what. I'd like to change the above to something like this: "if ${param.TO7} != null the print "-" and print ${param.TO7} Thanks in advance.
<c:if>, or, if using JSP 2.0, the ternary operator (?).
Please read the text at the top of the JSP forum and adhere to the policy of including the versions of JSP and JSTL that you are using when posting questions. [ August 01, 2006: Message edited by: Bear Bibeault ]
For consitions like if else we have to use <c:choose> tag
Ex:
<c:choose> <%-- there can be any no of 'c:when' statements --%> <c:when test="${string == null || empty string}"> Display True.... </c:when> <ctherwise> Dsiplay False .... </ctherwise> </c:choose>
There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Thanks! bear JavaRanch Sheriff
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.