wood burning stoves 2.0*
The moose likes Servlets and the fly likes How to send an array of Strings as a html response from  the doPost of the servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to send an array of Strings as a html response from  the doPost of the servlet" Watch "How to send an array of Strings as a html response from  the doPost of the servlet" New topic
Author

How to send an array of Strings as a html response from the doPost of the servlet

balu
Greenhorn

Joined: Feb 21, 2003
Posts: 4
hi all...
i have an array of strings which i want to display in my html response being generated by the servlets doPost method...
The point is..like i use..
out.println(<>String 1)
out.println(String 2)....how do i end it.....b'coz what i have is a an array and though i get to know its length in a variable how do i break the printing and let the out.println know that it is the last string.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

You can use a for loop


Or did I miss something?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send an array of Strings as a html response from the doPost of the servlet