I am storing my bean in classes of java web server , other code is: <jsp:useBean id="SimpleBean1" class="SimpleBean1" /> <jsp:setProperty name="SimpleBean1" property="message" value="Hello WWW" />
<H1>Message: <I> <jsp:getProperty name="SimpleBean1" property="message" /> </I></H1> I AM GETTING ERROR:Class pagecompile.jsp.SimpleBean1 not found in type declaration HOW COME ERROR OCCURES? THE SAME ERROR I AM GETTING FOR EJB ALSO
Hi, Its better to store your beans in a package and give the full path of the bean class file while declaring.. for example: store u'r simplebean in a package com.test.SampleBean1 and while declaring use this full path. Make sure that the bean class files r in the weblogic classpath.. Saran
Sun Certified Java2 Programmer
Joined: Feb 13, 2001
HI BHIDU(FRIEND), I HAVE BEANS IN A FOLDER OF TOMCAT/WEBAPPS. WHEN I TRY TO ACCESS BEAN IN JSP I GET ERROR THAT BEAN NOT FOUND. DO I NEED TO SET CLASS PATH OF BEAN?? PLZ LEMME KNOW EXACT STEPS OF USING BEAN: WHERE TO STORE THEN WHAT?? THEN JSP:USEBEAN ETC.
Hi James.. Pls Check whether you have imported SimpleBean1.class in this jsp page.that is before using useBean Tag. u will be writing page language="java" and then import ="java..." like wise u have import this SimpleBean class also.in your case i will like TOMCAT/WEBAPPS/SimpleBean1.class try this
I think you can place them in the lib directory for it to be automatically included in the classpath. You will still need the import statement unless it is in the root directory of the classpath. Faisal