You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Manos Papantoniou <ma...@h-infinity.co.uk> on 2003/10/18 19:09:42 UTC

Simple question, taglibs on eclipse-specific

I have a relatively basic question, and I expect someone who has been using
taglibs with eclipse to be able to answer it. I have very recently started
using eclipse, JSP and taglibs so please excuse me if you find this question
trivial. I have looked in the archives and couldn't find the answer, I
suppose this is too basic for most people to ask, but since I can't solve it
for a few hours... here is the problem:

I am using eclipse 2.1, with tomcat 5.0.12beta and the Lomboz plugin on a
windows machine. Java version is

java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)

I created a Lomboz J2EE project, and then a web module inside the project.
Simple JSP pages created in the module are deployed fine (when I say simple
I mean without taglibs). Also, the JSP 2.0 Expresion Language works fine (I
had to change the web.xml definition for that, since the one that is
automatically created by lomboz refers to the older style 2.3 but we want
2.4 for the EL to work), so my web.xml starts like that:

<?xml version="1.0" ?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd">

Now I have tried to add a taglib statement in the first line of the jsp page
and the eclipse editor flags it as an error. The statement is:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

as the taglibs readme states:

USING THE STANDARD TAG LIBRARY

To use this distribution with your own web applications, simply copy the JAR
files in the 'lib' directory (jstl.jar and standard.jar) to your
application's
WEB-INF/lib directory (add the other dependencies as well if your runtime
does not already provide them). Then, import JSTL into your pages with the
following directives:

  CORE LIBRARY
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

I have followed the readme instructions that come with taglibs (the precise
taglibs file I downloaded is jakarta-taglibs-20031006.zip). I copied the 2
libraries from the
jakarta-taglibs-20031006\jakarta-taglibs-standard-1.1.0-B1\lib folder,
jstl.jar and standard.jar to the WEB-INF\lib folder of my project, but still
the error is there. I have tried changing the uri to all variations,
removing the "/jsp" part, including the _rt in the end and everything. I
have tried adding the required libraries (.jar files) to the eclipse Project
Properties / Java Build Path / Libraries, since I think this is probably
some internal eclipse configuration issue, and by doing it through the IDE
it would generate the required dependencied internally, but the error is
still there.

Can anyone who uses taglibs with eclipse tell me how do you configure the
libraries? I cannot use the taglibs at all if I don't solve this, I have
spend several hours looking on the net, on the eclipse site, and the taglibs
archive but I cannot find this anywhere, everybody refers to more complex
problems. Can someone please help?

Thanks




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Simple question, taglibs on eclipse-specific

Posted by Felipe Leme <ja...@felipeal.net>.
Hi Manos,

There is another eclipse similar to lomboz, called MyEclipse IDE, Enterprise 
Workbench (www.myeclipseide.org).

Felipe


On Tuesday 21 October 2003 12:12 pm, Manos Papantoniou wrote:

> So apparently this is a bug of the editor or the Lomboz plugin (since AFAIK
> this plugin gives the eclipse editor JSP syntax highlighting and
> recognision capabilities). I have already made a post to the relevant


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Problem with c:import (JSTL 1.0)

Posted by Stephen Letschin <st...@media.umbc.edu>.
I am having a problem with a c:import that I hope someone has an answer to.

I have a JSP that is build out of several pieces (via a Struts Tiles
definition). As a result, I have developed some code which tracks the last
modified date of each piece and compares it against those I have seen so
far as the page is being built so that I can display the correct date in
the page's footer area. That code is below. It works fine in most cases.
However, I have one section of the page which I call header-extras which
is where I link in the CSS and JS files I need for that page as a part of
the page's header information. The header-extras file structure is
basically:
   <c:import url="the default header-extras file.jsp" />
   <style type="text/css">
   <!--
        <c:import url="page's specific CSS file.css.jsp" />
   -->
   <script language="javascript">
   <!--
        <c:import url="page's specific JS file.js.jsp" />
   //-->
   </script>

That structure has been working fine and I have the CSS and JS files as
actually JSPs which have as their output CSS and JS so I can store
comments and I was hoping so that I could include the last-modified date
code in them. Everything works fine until I add the last-modified date
code to any of the "CSS" or "JS" files. As soon as I do that, the page
loads the "CSS" or "JS" file with the date code in it and then ignores the
rest of the imports in the header-extras file. Anyone have any idea what I
am doing wrong? I am not getting any error messages that I could use for
debugging.
The date-modified code is:

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>

<fmt:setLocale value="en-US" />
<fmt:setBundle basename="resources.application" />
<fmt:parseDate
    var="lastModDate"
    value="10/23/2003"
    pattern="MM/dd/yyyy"
    scope="request" />
<c:if test="${empty lastModifiedDate || lastModDate > lastModifiedDate}"
    <c:set var="lastModifiedDate" value="${lastModDate}" scope="request" />
</c:if>

Thanks.

Stephen Letschin
stephen@media.umbc.edu




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Simple question, taglibs on eclipse-specific

Posted by Manos Papantoniou <ma...@h-infinity.co.uk>.
Hi Pierre,

and thanks for the reply. I have already tried the same code outside ecplise with tomcat 5 and works fine. Also, even within eclipse the web module is deployed to the tomcat webapps directory and runs fine! and at the same time the editor insists flagging an error! 

So apparently this is a bug of the editor or the Lomboz plugin (since AFAIK this plugin gives the eclipse editor JSP syntax highlighting and recognision capabilities). I have already made a post to the relevant eclipse newsgroup. I initially posted here too because it seems like an eclipse issue which is somehow related to the taglibs, and other people might come across it too, so it would be nice to make them aware of the problem. 


Manos 





  ----- Original Message ----- 
  From: Pierre Delisle 
  To: Tag Libraries Users List 
  Sent: Monday, October 20, 2003 7:14 PM
  Subject: Re: Simple question, taglibs on eclipse-specific


  Manos,

  What you're doing seems correct. To make sure there is no typo
  anywhere, why don't you just try a simple webapp with tomcat 5 only.
  If it works, then there's definitely a problem with eclipse and I'd
  suggest you try an eclipse support list.

      -- Pierre


Re: Simple question, taglibs on eclipse-specific

Posted by Pierre Delisle <Pi...@Sun.COM>.
Manos,

What you're doing seems correct. To make sure there is no typo
anywhere, why don't you just try a simple webapp with tomcat 5 only.
If it works, then there's definitely a problem with eclipse and I'd
suggest you try an eclipse support list.

    -- Pierre


Manos Papantoniou wrote:

> I have a relatively basic question, and I expect someone who has been using
> taglibs with eclipse to be able to answer it. I have very recently started
> using eclipse, JSP and taglibs so please excuse me if you find this question
> trivial. I have looked in the archives and couldn't find the answer, I
> suppose this is too basic for most people to ask, but since I can't solve it
> for a few hours... here is the problem:
> 
> I am using eclipse 2.1, with tomcat 5.0.12beta and the Lomboz plugin on a
> windows machine. Java version is
> 
> java version "1.4.2_01"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
> Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
> 
> I created a Lomboz J2EE project, and then a web module inside the project.
> Simple JSP pages created in the module are deployed fine (when I say simple
> I mean without taglibs). Also, the JSP 2.0 Expresion Language works fine (I
> had to change the web.xml definition for that, since the one that is
> automatically created by lomboz refers to the older style 2.3 but we want
> 2.4 for the EL to work), so my web.xml starts like that:
> 
> <?xml version="1.0" ?>
> <web-app version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd">
> 
> Now I have tried to add a taglib statement in the first line of the jsp page
> and the eclipse editor flags it as an error. The statement is:
> 
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> 
> as the taglibs readme states:
> 
> USING THE STANDARD TAG LIBRARY
> 
> To use this distribution with your own web applications, simply copy the JAR
> files in the 'lib' directory (jstl.jar and standard.jar) to your
> application's
> WEB-INF/lib directory (add the other dependencies as well if your runtime
> does not already provide them). Then, import JSTL into your pages with the
> following directives:
> 
>   CORE LIBRARY
>     <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> 
> I have followed the readme instructions that come with taglibs (the precise
> taglibs file I downloaded is jakarta-taglibs-20031006.zip). I copied the 2
> libraries from the
> jakarta-taglibs-20031006\jakarta-taglibs-standard-1.1.0-B1\lib folder,
> jstl.jar and standard.jar to the WEB-INF\lib folder of my project, but still
> the error is there. I have tried changing the uri to all variations,
> removing the "/jsp" part, including the _rt in the end and everything. I
> have tried adding the required libraries (.jar files) to the eclipse Project
> Properties / Java Build Path / Libraries, since I think this is probably
> some internal eclipse configuration issue, and by doing it through the IDE
> it would generate the required dependencied internally, but the error is
> still there.
> 
> Can anyone who uses taglibs with eclipse tell me how do you configure the
> libraries? I cannot use the taglibs at all if I don't solve this, I have
> spend several hours looking on the net, on the eclipse site, and the taglibs
> archive but I cannot find this anywhere, everybody refers to more complex
> problems. Can someone please help?
> 
> Thanks
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org