利用jsp页面查询,结果调用serverlet程序。
servlet里面大致有很多如:    table.addCell(center(gray(makeCell("序号"),1)));的语句。
结果页面显示的全是乱码。
一开始的属性设置大致如下:
   
   BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);请问是什么原因?属性设置这句话对么?有什么影响么?

解决方案 »

  1.   

    BaseFont bfComic = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H",BaseFont.NOT_EMBEDDED);
    Font font = new Font(bfComic, 12, Font.NORMAL);Cell cell=new Cell("中文支持",font);
      

  2.   

    BaseFont bfComic = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H",BaseFont.NOT_EMBEDDED);
    Font font = new Font(bfComic, 12, Font.NORMAL);Cell cell=new Cell("中文支持",font);
      

  3.   

    java操作word详解http://www.chinajavalab.com/cgi-bin/topic.cgi?forum=1&topic=46