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 "Dirk Manske (Mailing list)" <ma...@arcor.de> on 2004/10/06 01:03:33 UTC

JSTL 1.1: diffs between c and c-1_0

Hi,

I upgraded to JSTL 1.1 because we are now using Tomcat 5. At first I tried
the c.tld taglib. But this did not work. For example the result of <c:out
value="${aVariable}" /> for aVariable set to 100 was simply ${aVariable}
instead of 100. 

When I changed the c taglib to c-1_0.tld I got the expected result 100. But
this seems to me as when I am using the "old" c taglib version 1.0. So for
what is c.tld from the JSTL 1.1 package good for?! I could not find anything
in the spec about the diffs between c and c-1_0, maybe there is someone out
there who can give me advise.

thanks,
dirk 


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


AW: JSTL 1.1: diffs between c and c-1_0

Posted by "Dirk Manske (Mailing list)" <ma...@arcor.de>.
I got it solved. After I looked up the spec I found out, that I have to use
the new URIs... so changing it to http://java.sun.com/jsp/jstl/core did the
trick.

Dirk


-----

I am using the jstl 1.1.1 version with the following web.xml declaration:

<?xml version="1.0" encoding="UTF-8"?>
<web-app 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"
    version="2.4">

  <servlet>
    <servlet-name>springapp</servlet-name>
 
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-cl
ass>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>springapp</servlet-name>
    <url-pattern>*.htm</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>
      index.jsp
    </welcome-file>
  </welcome-file-list>
  
  <taglib>
    <taglib-uri>jstl/c</taglib-uri>
    <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
  </taglib>
   <taglib>
    <taglib-uri>jstl/fmt</taglib-uri>
    <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
  </taglib>

</web-app>


I am still facing the problem, that variables are not evaluated when using
the c taglib. But it works when using c-1_0...
Tomcat version is 5.0.28. Any help appreciated.

Dirk
 

-----Ursprüngliche Nachricht-----
Von: Felipe Leme [mailto:jakartalists1@felipeal.net] 
Gesendet: Mittwoch, 6. Oktober 2004 02:18
An: Tag Libraries Users List
Betreff: Re: JSTL 1.1: diffs between c and c-1_0

On Tue, 2004-10-05 at 20:03, Dirk Manske (Mailing list) wrote:

> I upgraded to JSTL 1.1 because we are now using Tomcat 5. At first I 
> tried the c.tld taglib. But this did not work. For example the result 
> of <c:out value="${aVariable}" /> for aVariable set to 100 was simply 
> ${aVariable} instead of 100.

Did you use the proper jars? You *must* use JSTL 1.1 on Tomcat 5, as it is a
JSP 2.0 container.

Note also that on JSP 2.0, the EL evaluation is done by the container (not
the tag handlers) but your application must be set with the proper web.xml
header (i.e., the one that uses the servlet 2.4 XML schema, and not the
servlet 2.3 DTD).

-- Felipe



---------------------------------------------------------------------
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


Re: AW: JSTL 1.1: diffs between c and c-1_0

Posted by Hassan Schroeder <ha...@webtuitive.com>.
Dirk Manske (Mailing list) wrote:

> I am using the jstl 1.1.1 version with the following web.xml declaration:

Remove this stuff and reload your webapp --
>   <taglib>
>     <taglib-uri>jstl/c</taglib-uri>
>     <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
>   </taglib>
>    <taglib>
>     <taglib-uri>jstl/fmt</taglib-uri>
>     <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
>   </taglib>

> I am still facing the problem, that variables are not evaluated when using
> the c taglib. But it works when using c-1_0...
> Tomcat version is 5.0.28. Any help appreciated.

On the same version of Tomcat, this test file works as expected:

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

<c:set var="wow" value="WOWSER"/>

<h1>${wow}</h1>
-------------------------------------------------------------------

If the above doesn't work for you, doublecheck you've got the right
jar file in /WEB-INF/lib ...

-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.



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


AW: JSTL 1.1: diffs between c and c-1_0

Posted by "Dirk Manske (Mailing list)" <ma...@arcor.de>.
I am using the jstl 1.1.1 version with the following web.xml declaration:

<?xml version="1.0" encoding="UTF-8"?>
<web-app 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"
    version="2.4">

  <servlet>
    <servlet-name>springapp</servlet-name>
 
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-cl
ass>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>springapp</servlet-name>
    <url-pattern>*.htm</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>
      index.jsp
    </welcome-file>
  </welcome-file-list>
  
  <taglib>
    <taglib-uri>jstl/c</taglib-uri>
    <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
  </taglib>
   <taglib>
    <taglib-uri>jstl/fmt</taglib-uri>
    <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
  </taglib>

</web-app>


I am still facing the problem, that variables are not evaluated when using
the c taglib. But it works when using c-1_0...
Tomcat version is 5.0.28. Any help appreciated.

Dirk
 

-----Ursprüngliche Nachricht-----
Von: Felipe Leme [mailto:jakartalists1@felipeal.net] 
Gesendet: Mittwoch, 6. Oktober 2004 02:18
An: Tag Libraries Users List
Betreff: Re: JSTL 1.1: diffs between c and c-1_0

On Tue, 2004-10-05 at 20:03, Dirk Manske (Mailing list) wrote:

> I upgraded to JSTL 1.1 because we are now using Tomcat 5. At first I 
> tried the c.tld taglib. But this did not work. For example the result 
> of <c:out value="${aVariable}" /> for aVariable set to 100 was simply 
> ${aVariable} instead of 100.

Did you use the proper jars? You *must* use JSTL 1.1 on Tomcat 5, as it is a
JSP 2.0 container.

Note also that on JSP 2.0, the EL evaluation is done by the container (not
the tag handlers) but your application must be set with the proper web.xml
header (i.e., the one that uses the servlet 2.4 XML schema, and not the
servlet 2.3 DTD).

-- Felipe



---------------------------------------------------------------------
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


Re: JSTL 1.1: diffs between c and c-1_0

Posted by Felipe Leme <ja...@felipeal.net>.
On Tue, 2004-10-05 at 20:03, Dirk Manske (Mailing list) wrote:

> I upgraded to JSTL 1.1 because we are now using Tomcat 5. At first I tried
> the c.tld taglib. But this did not work. For example the result of <c:out
> value="${aVariable}" /> for aVariable set to 100 was simply ${aVariable}
> instead of 100. 

Did you use the proper jars? You *must* use JSTL 1.1 on Tomcat 5, as it
is a JSP 2.0 container.

Note also that on JSP 2.0, the EL evaluation is done by the container
(not the tag handlers) but your application must be set with the proper
web.xml header (i.e., the one that uses the servlet 2.4 XML schema, and
not the servlet 2.3 DTD).

-- Felipe



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