tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Lambæk <...@lambaek.net>
Subject Re: Component class problem
Date Sun, 15 Sep 2002 19:40:38 GMT
Hello,

I place my *.class files in /WEB-INF/classes/, changing the name of the 
class (renaming the java file and recompiling ofcourse) makes the page 
work, it is only when I use the name Component with a large C that it 
fails...

I can reproduce the "error" on several computers...

Isn't /WEB-INF/classes/ the right place to store the class files ?! If 
not why is it then working when I call the class component, instead of 
Component ?!


Regards
Ole Lambæk

Jean-Francois Arcand wrote:
> Hi,
> 
> how are you packaging your code? It certainly not related to AWT. Jasper 
> is actually not able to find your class using its classloader. Have you 
> place your bean code under the lib directory?
> 
> -- Jeanfrancois
> 
> Ole Lambæk wrote:
> 
>> Hello,
>>
>> I'm developing a small web application on jakarta-tomcat 4.0.4, where 
>> I have a class named Component located in a package called test, with 
>> a single method "public String getData()".
>>
>> I wan't to use this class in a JSP with <jsp:useBean id="comp" 
>> scope="request" class="test.component" /> and retrive data with 
>> <jsp:getProperty name="comp"  property="data" /> but tomcat (jasper to 
>> be more precise) doesn't make the page into a servlet the error is:
>> org.apache.jasper.JasperException: Cannot find any information on 
>> property 'data' in a bean of type 'test.Component'
>>
>> If I change the getProperty to <jsp:getProperty name="comp" 
>> property="name" /> then jasper makes the servlet sourcecode which 
>> ofcourse cannot compile, because there is no getName() in 
>> test.Component but java.awt.Component has one ... For me it looks like 
>> jasper recognizes test.Component as java.awt.Component when it makes 
>> the JSP into a servlet.
>> If I change the name of test.Component to test.component (small c 
>> versus large C) then it works like I want it to ...
>> I have also tested this in Caucho Resin 2.1.4, where it works like it 
>> should, both with a small and a large c in Component...
>>
>> Is this a bug, or is the Component name for a class a reserved word in 
>> the JSP / Servlet specification ?!
>>
>> Regards
>> Ole Lambæk
>>
>>
>>
>>
>> -- 
>> To unsubscribe, e-mail:   
>> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <mailto:tomcat-user-help@jakarta.apache.org>
>>
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message