How to get parameter from Action Class and then match them with table values
D. Deepak Sharma
posted 4 years ago
Hello I am writing a code to validate the credentials of user that is username and user id from my data base and called chkValue(uid, uname) method
The action class code is like this:
here i am getting data from ActionForm class and want that data get authorization from chkValue() method from diff class where I can retrieve data using hibernate from the database.
there are 2 main problem
how to pass these parameter to checkValue class
How to retrieve data using Hibernate 3.6 and write the code for chkValue() method and return value so appropriate mapping can be called.
I have no idea what this checkValue class is but the part of you question dealing with Struts and actions should be posted clearly in the Struts forum with no mention of hibernate.
For the hibernate piece what we really want to see if your model objects and how they are annotated or if you are using xml then your xml configuration would be relevant. From a design perspective typically you would break the service and persistence logic out into their own layers.