Standard Label Problem - Tomcat Note 3

xiaoxiao2021-03-06  44

Many books have been talking about how to use JSTL, there is a problem:

<% @ Taglib Uri = "http://java.sun.com/jsp/jstl/core" prefix = "c"%> or <% @ Taglib URI = "http://java.sun.com/jstl/ Core "prefix =" c "%> will be wrong, saying that it is not defined in web.xml, it doesn't matter. I found the JSP code that also use JSTL in the example of Tomcat5.0 self-generation, then search for definitions in the Web.xml it corresponds, then I copy ... Wait, no? ! Examples of Cheng Zi Di are not good! ! what reason. Answer: There is JSTL.jar and standard.ja under the example in the autonomous example. Web.xml does not need to configure it, and even a .tld file. Standard.jar (JSP2.0 supports java.sun.com/jsp/jstl/core), JSTL.jar (support java.sun.com/jstl/core).

转载请注明原文地址:https://www.9cbs.com/read-58466.html

New Post(0)