struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prashant Samant" <Prashant.Sam...@mphasis.com>
Subject RE: Problem while using validator framework
Date Thu, 17 Jul 2003 10:00:13 GMT
Thanx for the reply,
But earlier i had tried "requiredif" value in the depends attribute and i got the following
stack trace.
 
[ERROR] Validator - -reflection: null <java.lang.reflect.InvocationTargetExcepti
on>java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
        at org.apache.struts.validator.FieldChecks.validateRequiredIf(FieldCheck
s.java:200)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.commons.validator.Validator.validateFieldForRule(Validator
.java:454)
        at org.apache.commons.validator.Validator.validateField(Validator.java:5
44)
        at org.apache.commons.validator.Validator.validate(Validator.java:582)
        at org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorF
orm.java:151)
        at org.apache.struts.action.RequestProcessor.processValidate(RequestProc
essor.java:942)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:255)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:263)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2390)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:1959)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
 
[ERROR] Validator - -reflection: null <java.lang.reflect.InvocationTargetExcepti
on>java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
        at org.apache.struts.validator.FieldChecks.validateRequiredIf(FieldCheck
s.java:200)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.commons.validator.Validator.validateFieldForRule(Validator
.java:454)
        at org.apache.commons.validator.Validator.validateField(Validator.java:5
44)
        at org.apache.commons.validator.Validator.validate(Validator.java:582)
        at org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorF
orm.java:151)
        at org.apache.struts.action.RequestProcessor.processValidate(RequestProc
essor.java:942)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:255)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:263)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2390)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:1959)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

what can be the problem in this case?
pls advise,
Prashant S.
 
 

-----Original Message-----
From: Nagendra Kumar O V S [mailto:nagendra@ikigo.com]
Sent: Thursday, July 17, 2003 3:20 PM
To: struts-user@jakarta.apache.org
Subject: Re: Problem while using validator framework



hi,
"validwhen" is not defined in ur validator-rules..
 
and i guess u have gone thro' the 1.1 release docs.. which talks about implementing the validwhen
validator in the next release..
as of now it does't have validwhen rule
 
-- nagi
 
 
 
-------Original Message-------
 
From: Struts Users Mailing  <mailto:struts-user@jakarta.apache.org> List
Date: Thursday, July 17, 2003 02:27:52 PM
To: Struts Users Mailing List  <mailto:struts-user@jakarta.apache.org> (E-mail)
Subject: Problem while using validator framework
 
Hello everybody,
I am trying to run a small application which validates a field.
But when i run the appilcation, i am getting the following error
" Validator - -No ValidatorAction called validwhen found for field method"

The following is my struts.config file
<struts-config>
<form-beans>

<form-bean name="orderForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="order" type="java.lang.String"/>
<form-property name="method" type="java.lang.String"/>
<form-property name="cardtype" type="java.lang.String"/>
</form-bean>
</form-beans>

<action-mappings>
<action path="/order"
type="OrderAction"
name="orderForm"
input="/order.jsp"
scope="request">
<forward name="success" path="/orderconfirm.jsp"/> 
<forward name="failure" path="/nobuy.jsp"/> 
</action>
</action-mappings>


<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>

<message-resources parameter="ApplicationResources" null="false" />

</struts-config>


The following is my validation.xml
<formset>

<form name="orderForm">
<field property="method" depends="validwhen">
<arg0 key="Payment method" resource="false"/>
<var>
<var-name>test</var-name>
<var-value> (*this* != null)</var-value>
</var>
</field>

</form>
</formset>

i am using weblogic 6.1.
pls advise .
Prashant S.

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


.

			
____________________________________________________
 <http://www.incredimail.com/redir.asp?ad_id=309&lang=9>   IncrediMail - Email has
finally evolved -  <http://www.incredimail.com/redir.asp?ad_id=309&lang=9> Click
Here 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message