About the function equals must be used with a prefix when a default namespace are not specified resolve

Source: Internet
Author: User
This problem is typical of the Tomcat version conflict:
When using the El expression, it is not correct to determine whether the list is empty: ${list.size () > 0}, but it is OK to use in tomcat7, but it is not supported in Tomcat 6 and in previous versions. So when it is TOMCAT6, the project will not error, but the operation will be error.
The solution is also relatively simple: use the length method in the JSTL fn tag
First introduced in JSP <%@ taglib prefix= "FN" uri= "Http://java.sun.com/jsp/jstl/functions"%>
Then use ${fn:length (list) > 0}, this way is compatible.
Another is User.getname () This will also be an error.

About the function equals must be used with a prefix when a default namespace are not specified resolve

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.