This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts Validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Validator" Watch "Struts Validator" New topic
Author

Struts Validator

Rajkumar Singh
Greenhorn

Joined: Jun 17, 2008
Posts: 4
Hello everybody,

I am new to Struts and have a question on Validator framework. I have a very unique and a dumb requirement where I want to store a username and password in an XML file. Whenever a user logs in into the system, the username and the password entered by him/her will be checked against the username and password stored in the XML file.

For this I want to use the Struts Validation framework. The question is how can I use it to meet my dumb requirement?

Thanks
Raj
Sachin Dere
Ranch Hand

Joined: Jan 14, 2003
Posts: 80
why do you think its a dumb requirement?
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

The simple suggestion from me

1. Parse the XML,
2. Find out the entered user name and password in each XML tag ..
3. If present , logged in else throw error massage ..

For this I want to use the Struts Validation framework.

How do you want this ??


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Rajkumar Singh
Greenhorn

Joined: Jun 17, 2008
Posts: 4
Originally posted by Sachin Dere:
why do you think its a dumb requirement?


Because we are storing the authentication details in the XML file instead of database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Validator
 
Similar Threads
struts2 xml validator error message placement?
problems in validation part of struts 2
add struts plugin
Struts 2 Validation Framework with annotation
problems validation.xml in struts 2