The function ValueOf must be used with a prefix when a default namespace are not specified error in the Java EE

Source: Internet
Author: User

JSP page, JSTL el expression string comparison common methods

Fn:contains to determine if a string contains another string <c:if test= "${fn:contains (name, SearchString)}" >
Fn:containsignorecase determines whether a string contains another string (case-insensitive) <c:if test= "${fn:containsignorecase (name, SearchString)}" >
Fn:endswith determines whether the string ends with a different string <c:if test= "${fn:endswith (filename,". txt ")}" >
Fn:escapexml convert some characters into XML representations, such as the < character should be converted to < ${fn:escapexml (Param:info)}
The position of the fn:indexof substring in the parent string ${fn:indexof (name, "-")}
Fn:join union the data in the array into a new string and uses the specified character format to open ${fn:join (array, ";")}
Fn:length gets the length of the string, or the size of the array ${fn:length (shoppingcart.products)}
Fn:replace replaces the character specified in the string ${fn:replace (text, "-", "?")}
Fn:split the string according to the specified word segmentation ${fn:split (customernames, ";")}
Fn:startswith determines whether a string starts <c:if test= "${fn:startswith (product.id," 100-") with a substring" >
Fn:substring Get substring ${fn:substring (zip, 6,-1)}
Fn:substringafter Gets the substring ${fn:substringafter (zip, "-") starting at the location of a character
Fn:substringbefore Gets the substring ${fn:substringbefore (zip, "-") from the beginning to the location of a character}
Fn:tolowercase converted to lowercase ${fn.tolowercase (product.name)}
Fn:touppercase to uppercase characters ${FN. Uppercase (Product.name)}
Fn:trim Remove the space before and after the string ${fn.trim (name)}

Function
Describe
Fn:contains (string, substring)
Returns true if the parameter string contains the parameter substring

Fn:containsignorecase (string, substring)
Returns true if the parameter string contains the parameter substring (ignoring case)

Fn:endswith (string, suffix)
Returns true if the argument string ends with the argument suffix

Fn:escapexml (String)
Convert XML (and HTML) that has special meaning to the corresponding XML character entity code, and return

Fn:indexof (string, substring)
Returns the position of the first occurrence of the parameter substring in the parameter string

Fn:join (array, separator)
Separator a given array array together with the given spacer, forming a new string and returning it.

Fn:length (item)
Returns the number of elements contained in the parameter item. The parameter item type is an array, a collection, or a string. If it is of type string, the return value is the number of characters in string.

Fn:replace (String, before, after)
Returns a String object. Replaces all occurrences of a parameter before string in a parameter string with a parameter after string, and returns the replaced result

Fn:split (string, separator)
Returns an array that splits the argument string with the parameter separator, and each part of the split is an element of the array

Fn:startswith (string, prefix)
Returns true if the argument string starts with the argument prefix

Fn:substring (string, begin, end)
Returns the string part of the argument, starting with the argument begin to the end position of the argument, including the character of the end position

Fn:substringafter (string, substring)
Returns the part of the string that the parameter substring after in the argument string??

Fn:substringbefore (string, substring)
Returns the part of the string that precedes the argument substring in the argument string

Fn:tolowercase (String)
Converts all characters of the argument string to lowercase and returns it

Fn:touppercase (String)
Converts all characters of the argument string to uppercase and returns it

Fn:trim (String)

When using an El expression in a JSP, it is not possible to use Java-provided functionality such as indexof ().
<c:if test= "${boolean.valueof (requestscope.addresult) ==false}" >

Error
The function ValueOf must be used with a prefix when a default namespace are not specified

The function ValueOf must be used with a prefix when a default namespace are not specified error in the Java EE

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.