String 将vector转换为字符串并拆分字符串以用于JSP

String 将vector转换为字符串并拆分字符串以用于JSP,string,jsp,vector,String,Jsp,Vector,我需要知道如何将vector转换为字符串,并为JSP拆分字符串 // Make sure that you use the same path/filename that you’ve saved earlier Vector<String[]> vec1 = FileReaderWriter.readFileToVector ("?/MyTestFile.txt"); String vec2 = vec1.toString(); Str

我需要知道如何将vector转换为字符串,并为JSP拆分字符串

// Make sure that you use the same path/filename that you’ve saved earlier
    Vector<String[]> vec1 = FileReaderWriter.readFileToVector        ("?/MyTestFile.txt");
    String vec2 = vec1.toString();  
    String split[] = vec2.split(",");
    for (int i = 0; i < vec1.size(); i++) 
    {
        // out.print("|");
        for (int j = 0; j < vec1.elementAt(i).length; j++) 
        {
 //         out.print(vec1.elementAt(i)[j] + ",");  
            //out.print("blah");
//          fieldlist.add(vec1.elementAt(i)[j]);

            out.print("<br/>");
        }
        //out.print("blah");
问题是输出是乱七八糟的,它没有打印向量中的内容


感谢与其将向量转换为字符串并拆分它,不如使用JSP在列表上循环。我建议不要使用scriptlet