• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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.

 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic