Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 248715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:21:58+00:00 2026-05-11T21:21:58+00:00

I am working on struts2 application. I have getter/setter in my action class. Now,

  • 0

I am working on struts2 application. I have getter/setter in my action class. Now, I am sending object of my action class (say Action.java) to DAO class (say Dao.java) as a parameter of some method. All is ruuning well, I am getting value of all getters in my Dao.java. Now, I want to do all this without creating and sending the object of Action.java to Dao.java.
Simply asking, is it possible to get action class- getter methods value in Dao.java without passing the object of Action.java ?

Please suggest.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:21:58+00:00Added an answer on May 11, 2026 at 9:21 pm

    Why do you want to do something like that?

    I suppose you are populating action fields from html form and than using this Action as a data transfer object to DAO. This is not very good design imho.

    If you are searching for cleaner solution you would be better if you use ModelDriven action. Your action will implement interface ModelDriven<YourModel> where YourModel will contain all data fields. Struts2 will automatically populate fields from the html form to YourModel. Then you can pass YourModel to DAO.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on struts2. In my action class I have written some accessors
I am developing an application using oracle 11g, Java(struts2) and Hibernate. I have table
I am working on a struts2 application. I have an auto generated field in
I am working in a struts-hibernate application. I have seen a error on 3rd
I am working on a Java/Struts application that uses Tomcat 6.0.10. It's a typical
I have a Websphere Portal application containing several portlets for which I'm currently working
I am working on a project which uses Java,MySql,Struts2 MVC and Hibernate. I tried
I am working on struts2 application in which i am using displaytag for pagination
i am working on a struts2 web application-project and using netbeans 6.9. i want
I am working on a struts2 project. I have created url with in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.