I am pretty new to Java and I'm curious if the following is possible...

I am using a forms piece called Frevvo that uses Apache Tomcat. I'd like to create a rule that will check a document to validate a username and password. In theory, I'd like for someone that is filling the form out to be required to input their given username and password/PIN Code and then hit sign. Once sign is clicked I'd like for the date to be entered. All of this has been written. The only thing that is not is the validation.

Is it possible to create a script within a rule that compares the username and password that is given to a document located somewhere on the server?

I know this is possible with LDAP or AD. But would like to avoid having to do that.