让JSTL在Tomcat和Eclipse中运行 [英] Getting JSTL to run within Tomcat and Eclipse

查看:140
本文介绍了让JSTL在Tomcat和Eclipse中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图让这个运行,但我不能。我使用Eclipse Galileo,Tomcat 5.5.23,并有几个JSTL。我最新的尝试是使用GlassFish jar文件jstl-impl-1.2.jar。我将它放在Tomcat的共享库中,将其作为外部jar添加到我的Eclipse项目中并将其导出。



有人可以告诉我,哪个jar加载到哪个文件夹以及如何告诉它在Eclipse中加载?

解决方案

将jstl包含在项目中非常简单,我所做的是: jstl-1.2.jar(JSP 2.1
容器,只有Tomcat 6,
否则为jstl-1.1)

    .jar)从
    http://repo1.maven.org/ maven2 / javax / servlet / jstl / 1.2 /



    界面(javax.servlet.jsp.jstl-api-1.2 .http:以及 http的实际实现类(javax.servlet.jsp.jstl-1.2.2.jar) ://search.maven.org/#brows Ë%7C-1002239589


  1. 复制到项目的WEB-INF / lib目录


  2. 在您的jsp中包含以下标签







对于eclipse,我需要知道你是否使用任何框架插件我使用MyEclipse,它会自动为我。


I've been trying to get this to run, but I can't. I'm using Eclipse Galileo, Tomcat 5.5.23 and have several JSTLs around. My latest try was to use the GlassFish jar file "jstl-impl-1.2.jar". I placed it in Tomcat's shared lib, added it as external jar into my Eclipse project and exported it.

Could anybody tell me, which jars to load in which folder and how to tell it to load in Eclipse?

解决方案

It's very simple to include jstl in your projects, what I do is:

  1. Download jstl-1.2.jar (JSP 2.1 containers only i.e. Tomcat 6, otherwise jstl-1.1.jar) from http://repo1.maven.org/maven2/javax/servlet/jstl/1.2/
    or
    the interfaces (javax.servlet.jsp.jstl-api-1.2.1.jar) from http://search.maven.org/#browse|707331597 and the actual implementing classes (javax.servlet.jsp.jstl-1.2.2.jar) from http://search.maven.org/#browse%7C-1002239589.

  2. Copy to your project's WEB-INF/lib directory

  3. Include the following tags in yours jsp's:

As for eclipse I need to know if your using any framework plugin, I use MyEclipse and it does it automatically for me.

这篇关于让JSTL在Tomcat和Eclipse中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆