File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[solved]bean mySearchBean not found within scope

 
wei liu
Ranch Hand
Posts: 35
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,

I have testing my application in Tomat6.0 with no errors. However, When I move it to the alive server which is Tomcat 5.5 in the firm, it shows

"java.lang.InstantiationException: bean mySearchBean not found within scope" error.

If there any difference about the jsp:userBean between Tomcat 6 and Tomcat 5.5.


thanks
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you post your bean class as well as your jsp (<jsp:useBean>) . jsp:useBean works in both tomcat5.5 and tomcat6.0
 
Surya Kant
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should not be any difference between in tomcat 6 & 5.5.
Might be the problem of scope of the java bean
 
wei liu
Ranch Hand
Posts: 35
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surya Kant wrote:There should not be any difference between in tomcat 6 & 5.5.
Might be the problem of scope of the java bean



Thanks for your reply ,Surya Kant. Yes it working fine on my localhost, but just show that errors on the server.
I have tried to put the scope in application but have the same error. Could you please tell me how to solve the problem.

 
Surya Kant
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please post your bean class & JSP page?
 
wei liu
Ranch Hand
Posts: 35
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my JSP Page!



And my Bean file is



thank you
 
Surya Kant
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not able to instantiate becuase it is not able to find the the class name you have specified.
2 things you can try
1.Put import statement in your JSP
2.Check whether your classpath contains out put directory or not
I hope this will solve your problem
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please give proper class name . Change your bean class name searchBeans to SearchBeans
 
wei liu
Ranch Hand
Posts: 35
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply, Surya Kant , and the problem has solved.
I followed your instruction and add import of beans.searchBeans and it is now working.


thanks again for your help
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic