Bookmark Topic Watch 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis
  • Mark post as helpful
  • send pies
  • Report post to moderator
A common problem that people run into in JSP pages is when the class loader cannot find beans that the pages reference. That usually results in an error message like "Class XYZ cannot be resolved to a type". Here are a few things to check:


  • Make sure that your beans are compiled properly and that the resulting class file is resident in the hierarchy rooted at the WEB-INF/classes folder.
  • Be sure that WEB-INF is spelled just that way -- case counts! web-inf, Web-Inf, or any other casing variation will not work.
  • Always place your bean classes in a package other than the unnamed default package. See PackageYourBeans.
  • Be sure that the fully-qualified class name (including the package) is included in your useBean declaration.
  • Make sure your class contains the 'public' modifier.
  • If all else fails, carefully check the spelling. Typos in class names and packages are easier to make (and harder to find) than you would think.



  • Back to the JspFaq
     
    Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
    how do I do my own kindle-like thing - without amazon
    https://coderanch.com/t/711421/engineering/kindle-amazon
      Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!