Struts 2 + Reading & Writing

I'm writing an application using Struts 2.

I need to read data from the action class and display in a table/drop down/textbox.

I've checked and tried a lot of examples on the net, but none has helped me.

So, can someone help me with that.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

vks_vickyConnect With a Mentor Author Commented:

Sorry for the delay in the response.

Struts2 requires you to define private variable and requires setter and getter method to send and receive the data.

Most of the examples on the net don't work, but once you add setter and getter, it works both ways.

Thanks for all the help and Cheers!!
Can you specify what exactly is the error you are getting? Forwarding to an action, writing data as attributes to the request and using them to display on the view is fairly easy in struts2.
vks_vickyAuthor Commented:

I'm not getting an error, its just that I'm not sure how to do it. Currently I'm writing the result to the page session and continuing to work.

So I need some help on how to configure the struts.xml/myop.xml and the action class and the JSP.

I'm looking for a complete working end-to-end example, a simple program.
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.


Please refer to the link below for a very simple example in Struts2; let me know if you require any help.
Ravi KallaTechnology LeadCommented:
below tutorial is a simple and illustrated with small examples. Hope this helps you...
from where u want to read data?
All Courses

From novice to tech pro — start learning today.