• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Struts 1.3 Validation Problem

 
Ranch Hand
Posts: 46
  • 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.


 
Ranch Hand
Posts: 51
  • 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
  • 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

 
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • 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.

 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!