How to retrieve data from a jsp page

I have created a page with some text boxes, file, submit button. In my Ist jsp, i am dynamically add Text boxes and File (for Uploading).

In the 2nd jsp, i am used Jakarata FileUpload API. I am able to retrieve all data and files except that value of dynamicall added text boxes. That is, I cannot retrieve data from dynamically added text boxes.

Using Jakarata FileUpload API, i can retrieve values of form data using

getString() method.

I want to know that there is any way or method for retrieving form data values into String Array.

regards

madhu

m.sudan21@gmail.com

[620 byte] By [m.sudan21a] at [2007-11-27 10:20:54]
# 1

Use parseRequest(request) to get the file information as you already are doing. However, I dont know how you can use request.getParameter("textField1") to get the other fields from the page. My work-around is as follows:

Change your submit button to an ordinary button and add an onClick event to it. Then in the javascript function that supports the onClick, add the textField1 as follows:

<form name="fileUploadForm" method="post" action="someAction" (((more code code here)))))

function submitButtonClick(){

document.fileUploadForm.action=

document.fileUploadForm.action+

"?textField1="+document.fileUploadForm.textField1.value"+

"&textField2="+document.fileUploadForm.textField2.value"+

"&textField3="+document.fileUploadForm.textField3.value";

document.fileUploadForm.submit();

}

As you can see in the above code, I append the textField1 name/value pair to the end of the action. Now in the server, you can use getParameter("textField1");>

George123a at 2007-7-28 17:06:26 > top of Java-index,Java Essentials,Java Programming...