---
title: "JSTL使用教程"
author: "xingsan_zhang"
date: "2014-11-10T23:33:00Z"
tags: []
categories: ["编程语言"]
slug: "jstl"
draft: false
lastmod: "2014-11-10T23:33:00Z"
id: 2154372
url: "https://uuider.iteye.com/blog/2154372"
---

前两天，自己写了个小程序，页面使用的JSP，标签语言用的是JSTL标签、EL表达式。

 

使用fmt标签格式化时间时，报错：

The absolute uri: http://java.sun.com/jsp/jstl/fmt cannot be resolved in either web.xml or the jar files deployed with this application

检查了引用的jar包发现没问题

JSTL1.1需要两个jar包，jstl.jar+standard.jar；而JSTL1.2只要一个jar包就可以了；

 

后来发现，JSP页面引入标签的语句&lt;%@ taglib prefix='fmt' uri="http://java.sun.com/jsp/jstl/fmt" %&gt;有问题，uri后面多了一个空格，好吧，一个空格害死人！

 

下面把JSTL的一个教程文档贴上来，以后用到，直接上来翻手册！

教程网址：http://www.yiibai.com/jstl