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.
LVL 5
vks_vickyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
vks_vickyConnect With a Mentor Author Commented:
Folks,

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!!
0
 
anilallewarCommented:
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.
0
 
vks_vickyAuthor Commented:
@Anil

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.
0
The new generation of project management tools

With monday.com’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.

 
anilallewarCommented:
@vks_vicky,

Please refer to the link below for a very simple example in Struts2; let me know if you require any help.

http://www.roseindia.net/struts/struts2/struts-2-hello-world.shtml
0
 
Ravi KallaTechnology LeadCommented:
below tutorial is a simple and illustrated with small examples. Hope this helps you...
http://www.vaannila.com/struts-2/struts-2-tutorial/struts-2-tutorial.html
0
 
enggagrawalCommented:
from where u want to read data?
0
All Courses

From novice to tech pro — start learning today.