Vinay,
 
my tag library accepts a Vector not a String.
This format "<%=imgList%>" according to my book should pass the Vector Object to the tag library.
I have tried it on a different jsp server (resin1.2.1) and it worked fine, but when I run it on the tomcat I get this error
 
Still looking for the answer.
 
Many thanks for all that are helping me out.
 
N.
-----Original Message-----
From: Vinay Menon [mailto:java@vinay.org.uk]
Sent: Wednesday, July 04, 2001 3:49 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: org.apache.jasper.compiler.CompileException: ... Unable to convert a String to java.util.Vector for attribute imgList

"<%=imgList%>"
would return a String wouldn't it? Its just the return of the toString method I guess. Is that what your tag library accepts? Or does it need a Vector at that position?
 
 
From: Nino Uziel
To: 'tomcat-user@jakarta.apache.org'
Cc: Ziv Rosenzweig
Sent: Wednesday, July 04, 2001 1:01 PM
Subject: RE: org.apache.jasper.compiler.CompileException: ... Unable to convert a String to java.util.Vector for attribute imgList

Hi Suresh,
 
I am using a JSP tag where I like to send a Java object to the java class.
 
The jsp file is
 
<%@ taglib uri="clientSkin.tld" prefix="iclient" %>
<%
 Vector imgList = new Vector();
    imgList.addElement("bla bla");
%>
<iclient:head imgList="<%=imgList%>"
/>
 
and the error I get is
 

org.apache.jasper.compiler.CompileException: FILE_TO_BE_RUN.jsp(16,0) Unable to convert a String to java.util.Vector for attribute imgList

So the jsp file sees to be ok in terms of type casting. I think the error is more towards the tomcat server.

Anyone has an idea ? Would appreciate any help.

 

N.

 

 

-----Original Message-----
From: Suresh Manne [mailto:sureshmanne@indbrain.com]
Sent: Thursday, July 05, 2001 1:06 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: org.apache.jasper.compiler.CompileException: ... Unable to convert a String to java.util.Vector for attribute imgList

I feel that there is problem with the type casting.
There should be something like  (java.util Vector) vector_variable = (java.util Vector) string_variable
 
Try to put (java.util Vector) before string variable. Hope it works
Suresh.
-----Original Message-----
From: Nino Uziel [mailto:nino@iweb.com]
Sent: Wednesday, July 04, 2001 5:25 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: org.apache.jasper.compiler.CompileException: ... Unable to convert a String to java.util.Vector for attribute imgList

Hi Guys,

I am not much of a Java programmer, and one of my engineers is getting the follwoing
error message. Anyone has an idea as to why ?

org.apache.jasper.compiler.CompileException: FILE_TO_BE_RUN.jsp(16,0) Unable to convert a String to java.util.Vector for attribute imgList

        at org.apache.jasper.compiler.TagBeginGenerator.convertString(TagBeginGenerator.java:268)
        at org.apache.jasper.compiler.TagBeginGenerator.generateSetters(TagBeginGenerator.java:210)
        at org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:288)
        at org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator.java:357)
        at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(JspParseEventListener.java:771)
        at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventListener.java:220)
        at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseEventListener.java:175)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
        at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
        at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
        at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
        at org.apache.tomcat.core.Handler.service(Handler.java:287)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)

        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
        at java.lang.Thread.run(Thread.java:484)


I have tried to look into the documentation of the org.apache.jasper.compiler.TagBeginGenerator,
but I haven't seen much there. Any idea that can point me in teh right direction ?

N.