• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error:Cannot find bean in any scope

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic