wood burning stoves*
The moose likes Struts and the fly likes  Cannot find bean in any scope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark " Cannot find bean in any scope" Watch " Cannot find bean in any scope" New topic
Author

Cannot find bean in any scope

anjali gosain
Greenhorn

Joined: May 09, 2005
Posts: 2
Hi all,
I m new to struts and i m struck with this error... I have to create a link which passes a parameter to the bean. but all i get is the error:

exception

javax.servlet.ServletException: Cannot find bean dataForm in any scope
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.servlet.jsp.JspException: Cannot find bean dataForm in any scope
org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:992)
org.apache.struts.taglib.TagUtils.computeParameters(TagUtils.java:206)
org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:442)
org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:334)
org.apache.jsp.index_jsp._jspx_meth_html_link_0(org.apache.jsp.index_jsp:196)
org.apache.jsp.index_jsp._jspx_meth_html_html_0(org.apache.jsp.index_jsp:119)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


here is the line from index.jsp

<html:link action="Data" paramId="report" paramProperty="report" paramName="dataForm"> Click here </html:link>


and struts-sonfig.xml

<form-bean name="dataForm"
type="ch02.DataForm"/>

<action
path="/Data"
type="ch02.DataAction"
name="dataForm"
scope="request"
input="/index.jsp">
<forward name="success" path="/results.jsp"/>
<forward name="failure" path="/index.jsp"/>
</action>


the class DataForm and DataAction are present in WEB-INF\classes\ch02 folder

can somone plz help me sort this out...

thanks in advance
anjali gosain
Greenhorn

Joined: May 09, 2005
Posts: 2
hey i managed to solve it out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot find bean in any scope
 
Similar Threads
problem with the name attribute of form tag
Problem in usebean
bean:message throwing NPE
Error while farwarding link to next page.
logic:iterate in struts