我正在实现jeuclid库,我的代码作为一个应用程序而不是作为servlet

时间:2014-07-03 04:54:53

标签: java jsp servlets tinymce

这件事有效

public class Convert{       
public static void main(String[] args) throws IOException 
{
Converter converter = Converter.getInstance();;        
converter.convert(new File("F:/outputxml.txt"),new File("F:/outBIGB.jpg"),"image/jpeg");
}
}

但这不..

   protected void processRequest(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException 
   {           
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        Converter converter = Converter.getInstance();
        converter.convert(new File("F:/outputxml.txt"),new File("F:/outBIGB.jpg"), "image/jpeg");
}

它会创建jpg文件但仍为空

当我尝试使用picasa或照片查看器打开图像时,它会显示"图像无效"

感谢任何帮助

0 个答案:

没有答案