You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Raghu Kanchustambham <kr...@gmail.com> on 2005/11/12 15:40:19 UTC

Validator framework introduces errors

Hi,
The minute I introduced Validator framework in my application .....
it started giving me the following error when I accessed the JSP ....
 centreList is used as a parameter for the dropdown. The minute I remove the
validation.xml from the path... the application runs fine again! :(
 very strange and i am not able to explain this behavior .. can someone
help?
  Thanks much in advance.
Regards,
Raghu

javax.servlet.jsp.JspException: Cannot find bean centreList in any scope
	org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
	fr.improve.struts.taglib.layout.field.OptionsCollectionTag.doStartTag(OptionsCollectionTag.java:115)
	org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_optionsCollection_0(StudentEnquiry_jsp.java:1088)
	org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_select_2(StudentEnquiry_jsp.java:1062)
	org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_grid_1(StudentEnquiry_jsp.java:1028)
	org.apache.jsp.student.StudentEnquiry_jsp._jspService(StudentEnquiry_jsp.java:258)





My validation.xml (very simple one):

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.0//EN"
          "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">


<form-validation>
    <formset>
        <form name="studentEnquiryForm">
            <field  property="studentEnquiry.firstName" depends="required">
                <arg0 key="firstName.mandatory"/>
            </field>
        </form>
    </formset>
</form-validation>

Re: Validator framework introduces errors

Posted by Raghu Kanchustambham <kr...@gmail.com>.
Hi Paul,
The minute I supress the field which requires the centreList, everything
works fine. As long as there is no "state" that is involved... that is ..
simple textboxes.... its working fine.
 All other variables in the request variables are getting wiped off ! :(


 On 11/12/05, Paul Benedict <pa...@yahoo.com> wrote:
>
> Some things to check:
>
> 1) You have a resource bundle loaded by Struts.
> 2) Your keys listed in the validator are in the resource bundle.
> 3) You have a configuration file which lists out the validations needed by
> the validator.
> 4) You're using the correct version of validator for your version of
> Struts.
>
> --- Raghu Kanchustambham <kr...@gmail.com> wrote:
>
> > Hi,
> > The minute I introduced Validator framework in my application .....
> > it started giving me the following error when I accessed the JSP ....
> > centreList is used as a parameter for the dropdown. The minute I remove
> the
> > validation.xml from the path... the application runs fine again! :(
> > very strange and i am not able to explain this behavior .. can someone
> > help?
> > Thanks much in advance.
> > Regards,
> > Raghu
> >
> > javax.servlet.jsp.JspException: Cannot find bean centreList in any scope
> > org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
> >
> >
> fr.improve.struts.taglib.layout.field.OptionsCollectionTag.doStartTag(
> OptionsCollectionTag.java:115)
> >
> >
>
> org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_optionsCollection_0
> (StudentEnquiry_jsp.java:1088)
> >
> >
> org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_select_2
> (StudentEnquiry_jsp.java:1062)
> >
> > org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_grid_1
> (StudentEnquiry_jsp.java:1028)
> > org.apache.jsp.student.StudentEnquiry_jsp._jspService
> (StudentEnquiry_jsp.java:258)
> >
> >
> >
> >
> >
> > My validation.xml (very simple one):
> >
> > <!DOCTYPE form-validation PUBLIC
> > "-//Apache Software Foundation//DTD Commons Validator Rules
> > Configuration 1.0//EN"
> > "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
> >
> >
> > <form-validation>
> > <formset>
> > <form name="studentEnquiryForm">
> > <field property="studentEnquiry.firstName" depends="required">
> > <arg0 key="firstName.mandatory"/>
> > </field>
> > </form>
> > </formset>
> > </form-validation>
> >
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Validator framework introduces errors

Posted by Paul Benedict <pa...@yahoo.com>.
Some things to check:

1) You have a resource bundle loaded by Struts.
2) Your keys listed in the validator are in the resource bundle.
3) You have a configuration file which lists out the validations needed by the validator.
4) You're using the correct version of validator for your version of Struts.

--- Raghu Kanchustambham <kr...@gmail.com> wrote:

> Hi,
> The minute I introduced Validator framework in my application .....
> it started giving me the following error when I accessed the JSP ....
>  centreList is used as a parameter for the dropdown. The minute I remove the
> validation.xml from the path... the application runs fine again! :(
>  very strange and i am not able to explain this behavior .. can someone
> help?
>   Thanks much in advance.
> Regards,
> Raghu
> 
> javax.servlet.jsp.JspException: Cannot find bean centreList in any scope
> 	org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
> 
>
fr.improve.struts.taglib.layout.field.OptionsCollectionTag.doStartTag(OptionsCollectionTag.java:115)
> 
>
org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_optionsCollection_0(StudentEnquiry_jsp.java:1088)
> 
>
org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_select_2(StudentEnquiry_jsp.java:1062)
> 
> org.apache.jsp.student.StudentEnquiry_jsp._jspx_meth_layout_grid_1(StudentEnquiry_jsp.java:1028)
> 	org.apache.jsp.student.StudentEnquiry_jsp._jspService(StudentEnquiry_jsp.java:258)
> 
> 
> 
> 
> 
> My validation.xml (very simple one):
> 
> <!DOCTYPE form-validation PUBLIC
>           "-//Apache Software Foundation//DTD Commons Validator Rules
> Configuration 1.0//EN"
>           "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
> 
> 
> <form-validation>
>     <formset>
>         <form name="studentEnquiryForm">
>             <field  property="studentEnquiry.firstName" depends="required">
>                 <arg0 key="firstName.mandatory"/>
>             </field>
>         </form>
>     </formset>
> </form-validation>
> 



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org