You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jarek Skreta <Ja...@nesscomp.com> on 2000/10/06 16:31:31 UTC
JSP and Beans
Hello,
I am trying a simple application where JSP pages use a Bean. The JSP in
question uses jsp:UseBean action and then jsp:setProperty to pass some
parameters. When I use the setProperty action with property='*' then the I
am getting an exception when the Bean is called indicating a 'null pointer'.
If I set properties explicitly (property="name" valu="value") then I am
getting the following exception:
org.apache.jasper.JasperException: Cannot find any information on property
'DbDriver' in a bean of type 'DbBean'
This all happens when I run the application from a browser with Tomcat (3.1)
running. If however, I run it from withing the development IDE (JDeveloper)
everything seems to be fine.
Anbody has an idea what to look for?
Thanks,
Jarek Skreta
mailto:JarekSkreta@nesscomp.com
RE: JSP and Beans
Posted by Jarek Skreta <Ja...@nesscomp.com>.
I think I am already doing this along those lines:
the properties in JSP (jsp:setProperty or request.getParameter()) and
methods inside the Bean are called DbDriver, DbURL whether the variables
inside the Bean are dbDriver and dbURL respectivly.
Jarek
-----Original Message-----
From: William Brogden [mailto:wbrogden@bga.com]
Sent: 06 October 2000 15:39
To: tomcat-user@jakarta.apache.org
Subject: Re: JSP and Beans
Jarek Skreta wrote:
>
> Hello,
>
> I am trying a simple application where JSP pages use a Bean. The JSP in
> question uses jsp:UseBean action and then jsp:setProperty to pass some
> parameters. When I use the setProperty action with property='*' then the I
> am getting an exception when the Bean is called indicating a 'null
pointer'.
> If I set properties explicitly (property="name" valu="value") then I am
> getting the following exception:
>
> org.apache.jasper.JasperException: Cannot find any information on property
> 'DbDriver' in a bean of type 'DbBean'
>
> This all happens when I run the application from a browser with Tomcat
(3.1)
> running. If however, I run it from withing the development IDE
(JDeveloper)
> everything seems to be fine.
>
> Anbody has an idea what to look for?
>
> Thanks,
>
> Jarek Skreta
>
Sounds like a naming convention problem to me, is your variable
named DbDriver? if so, try changing it to dbDriver.
WBB
Re: JSP and Beans
Posted by William Brogden <wb...@bga.com>.
Jarek Skreta wrote:
>
> Hello,
>
> I am trying a simple application where JSP pages use a Bean. The JSP in
> question uses jsp:UseBean action and then jsp:setProperty to pass some
> parameters. When I use the setProperty action with property='*' then the I
> am getting an exception when the Bean is called indicating a 'null pointer'.
> If I set properties explicitly (property="name" valu="value") then I am
> getting the following exception:
>
> org.apache.jasper.JasperException: Cannot find any information on property
> 'DbDriver' in a bean of type 'DbBean'
>
> This all happens when I run the application from a browser with Tomcat (3.1)
> running. If however, I run it from withing the development IDE (JDeveloper)
> everything seems to be fine.
>
> Anbody has an idea what to look for?
>
> Thanks,
>
> Jarek Skreta
>
Sounds like a naming convention problem to me, is your variable
named DbDriver? if so, try changing it to dbDriver.
WBB