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 Error:Cannot find bean in any scope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error:Cannot find bean in any scope" Watch "Error:Cannot find bean in any scope" New topic
Author

Error:Cannot find bean in any scope

amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
I am just learning struts .I made a very small application in struts .
My application flow is like this
The first page ask for username and password.page is submitted to temp.do
It invokes action form in which i match username and password if it is incorrect then i forward it to another page (temp.jsp)>If it is correct .then i forward it to temp1.jsp where i write code
<html:text property="username"/>
it throws error following error
If i remove that line it works fine
javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Don't forget that all <html:xxx> tags have to be enclosed in an <html:form></html:form> tag set. In your <html:form> tag, make sure that the action attribute specifies the action path for an action that is defined in struts-config.xml. This action must be associated with an ActionForm bean, and the ActionForm bean must have a password property.

If you've done all these things and it still doesn't work, show us:

1-your struts-config.xml file.
2-temp.jsp and temp1.jsp
3-your ActionForm bean for both temp.do and your ActionForm bean for your second action, whatever that is.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error:Cannot find bean in any scope
 
Similar Threads
URGENT:Tiles giving bean not defined
Problem reg. Delete Operation in my struts application
cannot find BEAN in any scope
problem getting data from form bean
form bean doesn't come into picture