http://opensourcehacker.com/2012/11/29/clean-up-python-source-code-with-pythontidy-available-as-sublime-text-2-plugin-too/
http://www.mularien.com/blog/2008/02/19/tutorial-how-to-set-up-tomcat-6-to-work-with-jstl-12/
omcat 6 does not ship with an implementation of JSTL. I decided to write up this quick start guide, since it’s really, really hard for new folks to know how to get started with Spring MVC (which is very often combined with JSTL) on Tomcat 6.
Sadly, Sun’s JSTL site does not even point you at the actual reference implementation of JSTL 1.2 (at least there’s no very obvious link that I have been able to find – but what good would a Sun web site be if it was easy to find what you were looking for?
).
The Apache Jakarta Taglibs project is the source of JSTL 1.0 and 1.1 reference implementations, but it isno longer maintained and will never implement JSTL 1.2.
Updated: Mar 1, 2011
You may now download the JSTL API and implementation JARs directly from the Sun Glassfish web site.Thanks to several alert readers for pointing this out!
Simply go to dev.java.net and download the two JAR files on the page for JSTL 1.2. Copy them into your Tomcat installation’slib directory and you should be all set!
You can also download the JSTL JAR (API and implementation in a single JAR) directly fromMaven Central.
If you are using Maven, you can pick up the JSTL dependency by including the following in your project’s POM file:
<dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency>
Older Information Below (2008 Vintage)
The JSTL 1.2 reference implementation has been folded into the Glassfish application server. It seems that Sun in its infinite wisdom has decided to make the reference implementation almost impossible to find. The link to “Reference Implementation” on theJSR-052 page points you to theSun Java EE download page (argh!)
So, how do you get this installed on Tomcat?
- Download the latest version of Glassfish V2 application server here.
- Unzip/install to a directory
- From the “lib” directory of the install, copy as follows:
- appserver-jstl.jar: Place in the WEB-INF/lib directory of your web application. This is preferable because you can ensure that the correct version of JSTL lives with your application. Note you may run into classloader issues when running on application servers other than Tomcat which supply their own (conflicting) JSTL implementations. In this case, remove this JAR from your web application, and move it into {tomcat-install}/lib.
- javaee.jar: In the {tomcat-install}/lib folder. This will make the JSTL 1.2 libraries available to all web applications.
Note that placing javaee.jar in the app server lib directory isn’t really the best way to go about this, but Tomcat will ignore the JAR if it’s included in your webapp due to the rule in section 9.3.2 of the Servlet 2.3 spec (in fact, it will ignore any JAR file completely if it contains the class javax.servlet.Servlet). For further reference, you can seethe classloader code. You will see the following error when your webapp is started up if you have javaee.jar in WEB-INF/lib (assuming appropriate logging is enabled):
INFO: validateJarFile({path-to-webapp}\WEB-INF\lib\javaee.jar) – jar not loaded. See Servlet Spec 2.3, section 9.7.2.
Offending class: javax/servlet/Servlet.class
For you Spring MVC’ers trying to get started with the latest versions of Tomcat and JSTL, hopefully this helps you!
本文提供了一步一步的指导,帮助读者了解如何在 Tomcat 6 上安装和配置 JSTL 1.2 的最新版本。文章详细介绍了从下载到安装的全过程,并提供了将 JSTL 库文件放置于正确目录的具体步骤。

被折叠的 条评论
为什么被折叠?



