This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 1.3 Validation Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.3 Validation Problem" Watch "Struts 1.3 Validation Problem" New topic
Author

Struts 1.3 Validation Problem

Mark Butcher
Ranch Hand

Joined: Jun 28, 2012
Posts: 46
Hi Guyz,

I get the following error on browser when I try to open the login page of my application :

java.lang.NullPointerException: Depends string "required" was not found in validator-rules.xml

Kindly help.
Thanks,
Mark.


Pyla Rao
Ranch Hand

Joined: Jul 10, 2012
Posts: 50
can you elaborate more or can you expose your source..??? Then i will surely help you..
Mark Butcher
Ranch Hand

Joined: Jun 28, 2012
Posts: 46
Sure, here is the code.

validation.xml :



validator-rules.xml :


JSP :


struts-config :


Eclipse error : The content of element type "field" must match "(msg|arg|var)*".

Login page error : java.lang.NullPointerException: Depends string "required" was not found in validator-rules.xml

Thanks
Mark

Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Hi Mark,
Everything looks fine but for the validators "allrequired" and "required" are using the same method signature. Have you overwritten the validator code. In any case how come two different validators use same method from the same class using same attributes [non user defined] and perform different operations?

Looks like you have to remove "allrequired" validator from your validation-rules file if it is added by mistake.



Have Fun with Java
little,little.. little by little makes a lot..
 
wood burning stoves
 
subject: Struts 1.3 Validation Problem
 
Similar Threads
Java-4b Please
do you believe in horoscopes ?
WA #1.....word association
public static void main(String args)
what's your font