You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Davide Manca <da...@matrix.it> on 2007/06/05 15:43:28 UTC

Jstl Tomcat 6 (if )

I have this code:

<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<jsp:useBean id="sbean" scope="request"
type="it.matrix.cercateatri.SearchBean"/>
<!-- riassunto -->
<tr><td colspan="3"><img src="/cercateatri/images/blank.gif" width="1"
height="10"/></td></tr>
<tr>
    <td><img src="/cercateatri/images/blank.gif" width="5"
height="1"/></td>    
    <td class="st7" align="left"><b>Hai cercato 
<c:if test="${fn:length(sbean.searchRequest.sm_exhibition) > 0}">lo
spettacolo '<c:out value="${sbean.searchRequest.sm_exhibition}" />'
</c:if>
<c:if test="${fn:length(sbean.searchRequest.sm_theatre) > 0}">nel teatro
'<c:out value="${sbean.searchRequest.sm_theatre}" />' </c:if>
<c:if test="${fn:length(sbean.searchRequest.sm_city_name) > 0}">a
'<c:out value="${sbean.searchRequest.sm_city_name}" />' </c:if>
<c:choose>
    <c:when test="${sbean.searchRequest.sm_f_date !=
sbean.searchRequest.sm_i_date}">per il periodo dal <c:out
value="${sbean.searchrequest.sm_i_date}" /> al <c:out
value="${sbean.searchRequest.sm_f_date}" /></c:when>
    <c:otherwise>per <c:out
value="${sbean.searchRequest.sm_f_date}" /></c:otherwise>
</c:choose>
<c:if test="${fn:length(sbean.searchRequest.sm_ex_type_name) > 0}">in
'<c:out value="${sbean.searchRequest.sm_ex_type_name}" />' 
</c:if>
    </b></td>
    <td><img src="/cercateatri/images/blank.gif" width="5"
height="1"/></td>    
</tr>
</table>   
<!-- /riassunto -->


And I get the following error:

HTTP Status 500 - 

________________________________________________________________________

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 


org.apache.jasper.JasperException: <h3>Validation error messages from TagLibraryValidator for c in /jsp/conclusions.jsp</h3><p>4: tag = 'if' / attribute = 'test': An error occurred while parsing custom action attribute "test" with value "${fn:length(sbean.searchRequest.sm_exhibition) > 0}": org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.</p><p>20: tag = 'if' / attribute = 'test': An error occurred while parsing custom action attribute "test" with value "${fn:length(sbean.searchRequest.sm_theatre) > 0}": org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.</p><p>25: tag = 'if' / attribute = 'test': An error occurred while parsing custom action attribute "test" with value "${fn:length(sbean.searchRequest.sm_city_name) > 0}": org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.</p><p>43: tag = 'if' / attribute = 'test': An error occurred while parsing cust
 om action attribute "test" with value "${fn:length(sbean.searchRequest.sm_ex_type_name) > 0}": org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.</p>
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:74)
	org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1797)
	org.apache.jasper.compiler.Validator.validate(Validator.java:1743)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
	org.apache.jsp.jsp.listing_jsp._jspx_meth_c_005fwhen_005f2(listing_jsp.java:845)
	org.apache.jsp.jsp.listing_jsp._jspx_meth_c_005fchoose_005f2(listing_jsp.java:810)
	org.apache.jsp.jsp.listing_jsp._jspService(listing_jsp.java:110)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
	org.apache.jsp.jsp.form_jsp._jspx_meth_c_005fif_005f24(form_jsp.java:1048)
	org.apache.jsp.jsp.form_jsp._jspService(form_jsp.java:328)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
	org.apache.jsp.jsp.index_jsp._jspx_meth_c_005fwhen_005f0(index_jsp.java:217)
	org.apache.jsp.jsp.index_jsp._jspx_meth_c_005fchoose_005f0(index_jsp.java:173)
	org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:131)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.10 logs.


________________________________________________________________________

Apache Tomcat/6.0.10



Thank you in advance

Re: Jstl Tomcat 6 (if )

Posted by Martin Gainty <mg...@hotmail.com>.
David

As Hassan mentioned you're seeing some version specific feature(s) i.e.

http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html
is version 1.1 specific

1.2 supports the Class PermittedTaglibsTLV
javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV which has the initialisation 
parameter
a.. permittedTaglibs: A whitespace-separated list of URIs corresponding to 
tag libraries permitted to be imported on the page in addition to the tag 
library that references PermittedTaglibsTLV (which is allowed implicitly).

1.2 version also allows you to load up a list of URI's (in addition to 
taglib which references PermittedTaglibsTLV)

HTH/
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Davide Manca" <da...@matrix.it>
To: "Hassan Schroeder" <ha...@gmail.com>
Cc: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Tuesday, June 05, 2007 10:38 AM
Subject: Re: Jstl Tomcat 6 (if )


> If I write
> http://java.sun.com/jsp/jstl/core instead of
> http://java.sun.com/jstl/core my jstl tags are not executed...
>
> Why?
>
> Thank you.
>
> On Tue, 2007-06-05 at 06:53 -0700, Hassan Schroeder wrote:
>> On 6/5/07, Davide Manca <da...@matrix.it> wrote:
>> > I have this code:
>> >
>> > <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
>> > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
>>
>> Mixing taglib versions can't be good :-)
>>
>> I'd change that last to 'uri="http://java.sun.com/jsp/jstl/core"' and see
>> what happens...
>>
>> FWIW,
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Jstl Tomcat 6 (if )

Posted by Davide Manca <da...@matrix.it>.
Ok I fixed!

In my web.xml I don't specify any jstl.

in my jsp I use

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

Now it works about everything.

Thank you.


On Tue, 2007-06-05 at 08:16 -0700, Hassan Schroeder wrote:
> On 6/5/07, Davide Manca <da...@matrix.it> wrote:
> > If I write
> > http://java.sun.com/jsp/jstl/core instead of
> > http://java.sun.com/jstl/core my jstl tags are not executed...
> >
> > Why?
> 
> What servlet spec version is your web.xml?
> 
> Perhaps you can distill and post a small test JSP?
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Jstl Tomcat 6 (if )

Posted by Hassan Schroeder <ha...@gmail.com>.
On 6/5/07, Davide Manca <da...@matrix.it> wrote:
> If I write
> http://java.sun.com/jsp/jstl/core instead of
> http://java.sun.com/jstl/core my jstl tags are not executed...
>
> Why?

What servlet spec version is your web.xml?

Perhaps you can distill and post a small test JSP?

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Jstl Tomcat 6 (if )

Posted by Davide Manca <da...@matrix.it>.
If I write 
http://java.sun.com/jsp/jstl/core instead of
http://java.sun.com/jstl/core my jstl tags are not executed...

Why?

Thank you.

On Tue, 2007-06-05 at 06:53 -0700, Hassan Schroeder wrote:
> On 6/5/07, Davide Manca <da...@matrix.it> wrote:
> > I have this code:
> >
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
> > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
> 
> Mixing taglib versions can't be good :-)
> 
> I'd change that last to 'uri="http://java.sun.com/jsp/jstl/core"' and see
> what happens...
> 
> FWIW,

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Jstl Tomcat 6 (if )

Posted by Hassan Schroeder <ha...@gmail.com>.
On 6/5/07, Davide Manca <da...@matrix.it> wrote:
> I have this code:
>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

Mixing taglib versions can't be good :-)

I'd change that last to 'uri="http://java.sun.com/jsp/jstl/core"' and see
what happens...

FWIW,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org