aspose file tools*
The moose likes JSP and the fly likes Needs to access array from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Needs to access array from servlet" Watch "Needs to access array from servlet" New topic
Author

Needs to access array from servlet

Lekshmanan Suresh
Greenhorn

Joined: Apr 04, 2012
Posts: 2
Dear all,

i am facing problem for posting row data from the forms to database via servlet.
also, i have stored all the elements in the jsp. How do i access from servlet.


See below of my codings:


var myArray = new Array((document.forms[0].length)-14);

var abc = myArray.length

alert(abc);

for(i=13;i<document.forms[0].length;i++){
myArray[i]= document.forms[0].elements[i].value;
// alert(myArray[i]);
}

for(i=13;i<myArray.length;i++){
// alert(i);
alert(myArray[i]);
}

I wanted to retrieve the myArray values from sevlet after submiting the form, Please need help also suggest me the optimum way to perform.


Rgards

Suresh
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
The code you have posted is java script code. What is your problem, you are having dificulty in submitting values from HTML or displaying values on HTML via Servlet?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Needs to access array from servlet