This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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: 40
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: 56207
    
  13

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: javax.servlet.ServletException: Cannot find bean employerSearchForm in any scope
 
Similar Threads
How to define an Integer using <bean:define>
Struts 1.2 Cannot find bean org.apache.struts.taglib.html.BEAN
JCaptcha and Struts
Exception
Cannot find bean