I was also using tomcat 3.2.1. I just upgraded from JDK 1.2 to 1.3, and that seems to have solved the problem. -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW/ 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 > -----Original Message----- > From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 4:55 AM > To: [EMAIL PROTECTED] > Subject: Re: Components problem: Unable to convert a String to > java.lang.Object for attribute content > > > > Hi Tim, > > Which web server do you use ? I have check a similar > example as yours on my > web server (tomcat 3.2.1), and it works fine with latest Components > distribution. > > I have already encountered the error message "Unable to > convert a String to > java.lang.Object ..." on server like weblogic 5.xx. A > solution is to remove the > method "void setContent( Object value )" method in class > taglib.commponents.PutTag.java and recompile Components. > Using "ant" and the > provided "build.xml" file should work if you set "build.properties" > appropriately. Contact me in case of trouble. > > Cedric > > > Tim Moore wrote: > > > I'm trying to figure out the Components Library extension > to Struts. I've > > got a simple JSP: > > > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > <%@ taglib uri="/WEB-INF/components.tld" prefix="template" %> > > > > <html:html> > > <head> > > <title>Content Form</title> > > </head> > > > > <body bgcolor="white"> > > > > <html:errors/> > > > > <html:form name="testForm" action="saveContent.do" > > type="blackboard.presentation.common.TestForm"> > > > > <template:insert template="/contentForm.jsp"> > > <template:put name="label" content="Text:" > direct="true"/> > > <template:put name="property" content="contentForm" > direct="true"/> > > </template:insert> > > > > <table border="0" width="100%" cellpadding="5" > cellspacing="0"> > > <tr> > > <td width="10" align="left" valign="top"><img > > src="/images/spacer.gif" alt="" width="10" height="1" > border="0"></td> > > > > <td align="right"><html:cancel/> <html:submit/></td> > > </tr> > > </table> > > </html:form> > > </body> > > </html:html> > > > > When I try to hit the page, I get this error: > > > > Error: 500 > > Location: /sleepyweasel/content.jsp > > Internal Servlet Error: > > org.apache.jasper.compiler.CompileException: > > > D:\jakarta-tomcat-3.2.1\webapps\sleepyweasel\content.jsp(16,8) > Unable to > > convert a String to java.lang.Object for attribute content > > at > > > org.apache.jasper.compiler.TagBeginGenerator.convertString(Tag > BeginGenerator > > .java:271) > > at > > > org.apache.jasper.compiler.TagBeginGenerator.generateSetters(C > ompiled Code) > > at > > > org.apache.jasper.compiler.TagBeginGenerator.generateServiceMe > thodStatements > > (TagBeginGenerator.java:291) > > at > > > org.apache.jasper.compiler.TagBeginGenerator.generate(TagBegin > Generator.java > > :360) > > at > > > org.apache.jasper.compiler.JspParseEventListener$GeneratorWrap > per.generate(C > > ompiled Code) > > at > > > org.apache.jasper.compiler.JspParseEventListener.generateAll(C > ompiled Code) > > at > > > org.apache.jasper.compiler.JspParseEventListener.endPageProces > sing(JspParseE > > ventListener.java:175) > > at > org.apache.jasper.compiler.Compiler.compile(Compiled Code) > > at > > org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) > > at > > > org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader1 > 2.java:146) > > at > org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) > > at > > > org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfN > ecessary(JspSe > > rvlet.java:152) > > at > > > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service > (JspServlet.ja > > va:164) > > at > > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet > .java:318) > > at > org.apache.jasper.servlet.JspServlet.service(Compiled Code) > > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > at > > > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper > .java:404) > > at org.apache.tomcat.core.Handler.service(Handler.java:286) > > at > > > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) > > at > > > org.apache.tomcat.core.ContextManager.internalService(ContextM > anager.java:79 > > 7) > > at > > > org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) > > at > > > org.apache.tomcat.service.http.HttpConnectionHandler.processCo > nnection(HttpC > > onnectionHandler.java:210) > > at > org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) > > at > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled > > Code) > > at java.lang.Thread.run(Thread.java:479) > > > > Can Cedric or anyone shed some light? My page seems > straightforward enough, > > and it seemed to work OK with standard Struts templates, > but I need to use > > some advanced features in the contentForm.jsp that require > the use of the > > Components Library. > > > > Thanks! > > -- > > Tim Moore / Blackboard Inc. / Software Engineer > > 1899 L Street, NW/ 5th Floor / Washington, DC 20036 > > Phone 202-463-4860 ext. 258 / Fax 202-463-4863 >

