乘法口诀

请问如何实现 在类中写代码 在jsp页面显示乘法口诀呢?
这个是我写的
public class ChengFa {

public static void main(String[] args) {

    int i,j;
    for (i = 1 ; i <= 9 ; i ++){
         for(j = 1 ; j <= i ; j ++){
       System.out.print(j + "*" + i + "=" + i * j + " ");
         }
       System.out.println();
     }

}

}我要用 tomcat JBoss weblogic 和 webshere 四个服务器先后运行这个乘法口诀,请问如何实现,详细些,谢谢!

System.out 改成out
System.out.println(); 改成 out.print("
");

要用response对象的 getWriter 或 out 写响应流