Is your bean in a package? If not Tomcat will not find it in the default package.
just add "package com.mypackage" to bean source, and put class file in classes/com/mypackage ron -----Original Message----- From: Wilson Snook [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 4:31 PM To: Tomcat Users List Subject: You used <servlet-mapping> to make your servlet work, but what about a JSP page with a bean? I am a newbie experiencing a very frustrating problem. I have a web application that uses a packaged javabean. When I create a web application with the correct directory structure under the 'webapps' directory (see below), having created a context in 'server.xml', going to the localhost page produces the following error: HTTP Status 500: ...JasperException: Cannot find any information on property 'uName' in a bean of type 'coreBeans.FormBean'... BUT...if I move this application's components in the appropriate directories under the 'examples' folder, it works (therefore the JSP page and the bean are not broken in any way). BUT...if I leave the webapp where it is and disable the bean, the JSP page works (although that's not a lot of use <g>) even if I use JSP statements in it. I do have Apache HTTP server on this machine, but I mention it without knowing how this would be relevant in any way. AND...I tested another web application that uses a servlet and this would not work either. HOWEVER...I fixed that by using a suitable <servlet-mapping> tag in 'web.xml'. Unfortunately, I don't think I can do this with a bean (or can I?). Does anyone out there know: 1) why my webapp can't find the bean class? 2) why mapping a servlet solves a similar problem for a JSP page using it? 3) how I can get my webapp to find the bean class? I won't at this stage post the webapp JSP page, bean code or xml since I know they work if placed under the 'examples' directory. This problem has been driving me nuts for nearly a week and if anybody could shed some light upon it I think I would be close to ecstatic. TIA, Wilson ::Tomcat 4.1.18 ::Apache 2.043 ::Win2K ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ My directory structure is: %TOMCAT_HOME%/webapps/core/ -->index.jsp -->WEB-INF/classes/coreBeans/FormBean.class My context in 'server.xml' is: <Context path="/core" docBase="core" debug="0" reloadable="true" /> The (unmodified) virtual host is <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" /> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
