File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes javax.servlet.ServletException: Cannot find bean employerSearchForm in any scope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "javax.servlet.ServletException: Cannot find bean employerSearchForm in any scope" Watch "javax.servlet.ServletException: Cannot find bean employerSearchForm in any scope" New topic
Author

javax.servlet.ServletException: Cannot find bean employerSearchForm in any scope

Clayton Cramer
Ranch Hand

Joined: Aug 26, 2010
Posts: 41
Here's the page that Tomcat 5.0 is throwing at me:



I'm utterly lost as to why it can't find employerSearchForm. Here's the JSP that is trying to display the page:



EmployerSearchForm is certainly defined. If I remove the <bean:define id="thisForm" name="employerSearchForm" type="otrack.ftrack.offender.EmployerSearchForm"/> line (and of course, everything dependent on it), it runs just fine. Worse, it is inconsistent. Sometimes it throws the error above; sometimes it successfully calls the getter for the specified properties. My guess is that there is something that needs to be set in the JSP to tell it to load the offenderSearchForm class.

I didn't write this code, and I am only slowly learning JSP. (I think my dislike for it is hindering my learning.) Any suggestions?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60783
    
  65

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.servlet.ServletException: Cannot find bean employerSearchForm in any scope
 
Similar Threads
Exception
Struts 1.2 Cannot find bean org.apache.struts.taglib.html.BEAN
How to define an Integer using <bean:define>
JCaptcha and Struts
Cannot find bean