aspose file tools*
The moose likes Servlets and the fly likes JSP +Bean/EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP +Bean/EJB" Watch "JSP +Bean/EJB" New topic
Author

JSP +Bean/EJB

james_deshpande
Greenhorn

Joined: Feb 13, 2001
Posts: 23
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
Saran Vel
Ranch Hand

Joined: Nov 03, 2000
Posts: 111
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


Saran
Sun Certified Java2 Programmer
james_deshpande
Greenhorn

Joined: Feb 13, 2001
Posts: 23
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.
raghavan
Greenhorn

Joined: Mar 03, 2001
Posts: 9
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
faisal mahmood
Ranch Hand

Joined: Nov 30, 2000
Posts: 349
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP +Bean/EJB