tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 赵顺 <cnjoy...@gmail.com>
Subject Re: EL expressions do not work in tag file (tomcat 6.26)
Date Sun, 04 Jul 2010 05:22:51 GMT
It steel does not work after I change to 2.5 and tomcat 6.0.18 works(both
*.jsp and *.tag) and 6.0.26 does not work in *.tag file
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd "
        version="2.5">
my tag file like this

<%@ attribute    name="width"    type="java.lang.Integer"
required="false"    description="width" %>
<%@ tag

import="org.apache.commons.beanutils.BeanUtils,javax.servlet.jsp.tagext.SimpleTagSupport,javax.servlet.jsp.tagext.SimpleTag"
    pageEncoding="utf-8"
    description="grid " %>

    <c:if test="${empty (width)}">
            <c:set var="width" value="120"/>
    </c:if>
    <jsp:doBody var="jspBody" scope="page" />
${width}


it seem to be show the value of width  on the page but in tomcat 6.0.26 it
show ${width} directly

On Sun, Jul 4, 2010 at 10:25 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 赵顺,
>
> On 7/3/2010 8:44 AM, 赵顺 wrote:
> > <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
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> >     version="2.4">
> > use jsp 2.4
>
>
> That's not JSP 2.4, it's JSP 2.0. You might want to specify 2.5, which
> will get you JSP 2.1. That might fix everything for you.
>
> >  <taglib>
> >        <taglib-uri>jet</taglib-uri>
> >        <taglib-location>/WEB-INF/jet.tld</taglib-location>
> >     </taglib>
>
> And what does your JSP look like?
>
> > and the el expressions works fine in jsp file such as ${1+1} ${var}
> > but the same expressions do not work in .taf file it print out the
> > expression directly
>
> You mean a .tag file, right? Can you post one of those that doesn't work
> properly?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkwv8Q4ACgkQ9CaO5/Lv0PCapgCdHCFfTa8ENdX9ACBXj7dW93Zf
> SBMAoLqzG31PYu3i6lHuCc9blWgRpXsF
> =BVEs
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
                   致
       礼!


              赵顺cnjoyfun@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message