• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 1.3 Validation Problem

 
Mark Butcher
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you elaborate more or can you expose your source..??? Then i will surely help you..
 
Mark Butcher
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 329
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic