0

When trying to use a java bean in the jsp useBean attribute it's always generating errors like "invalid bean class"

For example: <jsp:useBean id="myID" class="myPack.Myclass" /> But it still throws invalid class value Exception.

  • Does `myPack.Myclass` exist in your project/classpath? Do you need to import it as well? Have you taken a look at the documentation of `useBean`? – f1sh Nov 23 '22 at 22:25
  • Yes i have, this is my project structure: myproject/myPack/Myclass – Moses Henen Nov 23 '22 at 22:31
  • Does MyClass have a no-arguments constructor? And - is there any more information available except „invalid bean class“? – Christoph Dahlen Nov 24 '22 at 06:03
  • It have a no argument constructor but when I run the code it returns a HTTP 500 status saying the value of the used bean class attribute is invalid, the type of the error is exception report, description is: The server encountered an internal error that prevented it from fulfilling this request, that's the only thing it report. – Moses Henen Nov 24 '22 at 14:44

0 Answers0