tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <h...@gefionsoftware.com>
Subject Re: problem in sending the bean as a parameter to taglib
Date Tue, 09 Jan 2001 19:54:36 GMT
> Madhavi Thulluru wrote:
> 
> Hi,
>     I am working with taglibs in JSP. In that I have to send one bean
> as an argument to a taglib. It was working perfectly with
> Jakarta-tomcat version 3.1, Linux 7 and JDK 1.3. Now we switched to
> Jakarta-tomcat version 3.2 and the remaining are same.
> Now I am getting problem with this.
> The code is :
> 
> <%@ taglib uri="/directory" prefix="v_dir" %>
> <jsp:useBean id="dirObj" class="directory.dirHome" scope="request">
> <jsp:setProperty name="dirObj" property="*"/>
> </jsp:useBean>
> 
> <v_dir:dirMainpage obj="<%= dirObj %>"/>
> Now when I am passing bean id  "dirObj" - it is giving error :
> 
> error message is : " org.apache.jasper.compiler.CompileException:
> /var/www/pms-mysql/jsp/tools/6/directory.jsp(7,0) Unable to convert a
> String to directory.dirHome for attribute obj "
> 
> I just commented the bean passing code and tried. to my surprise it is
> still giving the same error.
> The code is :
> 
> <%@ taglib uri="/directory" prefix="v_dir" %>
> <v_dir:dirMainpage obj="<%= dirObj %>"/>
> 
> Can you anyone help me in soling this problem...

Are you sure you have specified that the obj attribute accepts
request-time attribute values in the TLD? It sounds like the
attribute value is interpreted as a String instead of a JSP
expression.

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

Mime
View raw message