Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Tell me error in code of jsp:useBean

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to use <jsp:useBean> , what all code i have to write because i have write the code :

<jsp:useBean id="myBean" class="test1.BeanClass" scope="application">
</jsp:useBean>

then it give the following error :

E:\Program Files\Tomcat 5.0\work\Catalina\localhost\test\org\apache\jsp\bean_jsp.java:56: cannot resolve symbol
symbol : class BeanClass
location: class org.apache.jsp.bean_jsp
BeanClass myBean = null;

what extra should i write to meke it run , i have also cteated a BeanClass under test1.BeanClass.

Please suggest.
Thanks
Gaurav
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i have also cteated a BeanClass under test1.BeanClass.


Is it in /WEB-INF/classes/test1/BeanClass.class ?
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see http://faq.javaranch.com/view?BeansNotFound
 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ya , it is there in the WEB-INF\classes\test1\BeanClass , i am not able to understand that why it is not working.
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
did u import BeanClass in your jsp?

<%@ page import="test.BeanClass" %>
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In BeanClass.java, did you set the package to test1 ?
And is your bean public ?

 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mike Corleone:
did u import BeanClass in your jsp?

<%@ page import="test.BeanClass" %>



Mike,
Two things:

First:
We're pleased to have you here with us in the JSP forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here


Second:
In an effort to help you get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here. In particular, please see UseRealWords.

Abbreviations such as "ur" instead of "you are" confound language translation software which makes your posts difficult for non-English speaking members to read.

Thank you for your attention to these details.
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic