System.out.println(String)-->输出到了控制台
试一下用  javax.servlet.jsp.JspWriter类,应该可以输出到页面

解决方案 »

  1.   

    可以试一下用javabean写函数返回字符串(或其它类型的数据)然后在jsp中用out.println输出
      

  2.   

    这样写的bean根本就是一个普通的类了
    没用上javabean的思想
    给你个简单的jsp+javabean实例:///testbean.jsp<%@ page contentType="text/html; charset=GBK" %>
    <html>
    <head><title>TestBean.Jsp</title></head><jsp:usebean id="testBean" scope="session" class="testapp.TestBean" />
    <jsp:setProperty name="testBean" property="*" /><body bgcolor="#ffffff">
    <h1>
    JBuilder Generated JSP
    </h1><form method="post">
    <br>Enter new value of sample :  <input name="sample"><br>
    <br><br>
    <input type="submit" name="Submit" value="Submit">
    <input type="reset" value="Reset"><br>The setted value of sample is :<jsp:getProperty name="testBean" property="sample" />
    </form></body>
    </html>
    ///TestBean.javapackage testapp;public class TestBean {
      private String sample = "Start value";  public TestBean(){
      }  public String getSample() {
        return sample;
      }  public void setSample(String newValue) {
        if (newValue!=null) 
          sample = newValue;
      }
    }
      

  3.   

    楼主的程序没有要求显示数据啊,如要显示的话
    <%= ab.getArray(); %>
      

  4.   

    System.out.println(str[i]);----》
    out.println(str[i]);晕,要改的地方太多了,不写了。看看 zcjl(莫等闲,白了少年头) 给你的例子吧你在JSP里调用bean的方法也不是个好习惯