• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JSP +Bean/EJB

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
james_deshpande
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic