File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes HashMap :struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HashMap :struts" Watch "HashMap :struts" New topic

HashMap :struts

sudharshan tettu
Ranch Hand

Joined: Jul 17, 2006
Posts: 126

I have one requirement like
Initally on the page ,i have to show single row with name[textfield]
and empid[textfield].....
User has to enter the values there ,and can submit.
If he wishes he can add one more similar row before submitting ,and has to submit both .
i want to collect the data in hashmap key-value pairs.How to do it dyanmically in struts

[// for now i have dispatch action : for adding and submitting and i invoke app method in action class , if he has added a row or submitted the forms]

please help
Robert Siqueira
Ranch Hand

Joined: Jan 21, 2008
Posts: 38
Hey !!

To use a hashmap in your struts jsp page, do something like this:

struts always will popullate you hash passing the line number
and the value wich you put in the text..

I agree. Here's the link:
subject: HashMap :struts
It's not a secret anymore!