[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] [Home]

Re: compilation exception


Hi Kit,

Kit McCormick wrote:
> I'm getting an error while trying to use a bean in a servlet:
> 
> Method getName() not found in class java.lang.Object
> out.print(__valueOf( hello.getName() ));
> 
> where 'hello' is supposed to be an instance of HelloBean, not Object..
> 
> My jsp file looks like:
> 
> <%@ import = "HelloBean" %>

I don't think you need this.

> <BEAN NAME-"hello" CLASS="HelloBean"
            ^
What happens if you replace this with an equals-sign? I don't know why
GNUJSP even accepted this file, because the NAME-parameter is mandatory.

>     INTROSPECT="yes" CREATE="yes" SCOPE="session">
> </BEAN>

> 
> <html><head>
> <title>
> <% = hello.getName() %>
> </title>
> </head>
> <body>
> <P>bean test
> </body>
> </html>

Regards, Vincent.