Forums Register Login

How to get parameter from Action Class and then match them with table values

+Pie Number of slices to send: Send
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.

  • +Pie Number of slices to send: Send
    Just a suggestion the reason you are probably not getting responses to your questions is you are asking to much and some of what you are asking is in not in the appropriate forum.

    This should be split into at least 2 questions:

    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.

    +Pie Number of slices to send: Send
    Please do not post similar questions more than once.
    Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com


    Reply locked
    This thread has been viewed 851 times.
    Similar Threads
    Serious Struts Compatibility issue
    struts form beans
    SEVERE: Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown.
    How to pass variable to Model/Business class
    Why ConstraintViolationException is generated?
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Mar 28, 2024 11:22:21.