Hello, I am very new to struts 2. I have a requirement to pass HashMap object as argument to execute method in action class.... and display its contents in JSP.
I've never tried, but I don't see any facility to pass an argument to an action method in the documentation. Exactly what are you trying to do? Where does this hashmap come from? In order to be passed to the execute method it has to come from a form or an interceptor. Is there any way for the action method to fetch the information it needs?
NO actually, I have hardcoded a HashMap in execute method. When i try to display the contents of Hashmap in JSP, it is not displaying it. My code goes here:
And also, i am not able to trace, where exactly values of System.out.println is printing..i am not able to figure out where is console output in Tomcat 6.0
Thank you Nishan,
Thank you very much for your reply.
Even after adding your code to display key and value, I am not able to see the contents of my Hashmap on the web page.
Can't understand where i am going wrong.