DataBaseBean.ConnPool.MyFun是一个包还是一个class?

解决方案 »

  1.   

    包名怎么还有大写字母?好几年前就不推荐用大写字母了
    问题可能出在MyFun那里,你把stacktrace贴全了,别光贴一个exception message,然后大家再看看
      

  2.   

    public static void downloadFile(String SqlStr, String imgfieldstr)
        {
            Connection conn = getConnection();
            PreparedStatement temppstmt = null;
            ResultSet rs = null;
            try
            {
                temppstmt = conn.prepareStatement(SqlStr);
                rs = temppstmt.executeQuery();
                if(rs.next())
                {
                    InputStream in = rs.getBinaryStream(imgfieldstr);
                    m_response.reset();
                    m_response.setContentType("image/jpeg");
                    byte b[] = new byte[1024];
                    int i;
                    while((i = in.read(b)) > 0) 
                        m_response.getOutputStream().write(b, 0, i);
                    in.close();
                }
                rs.close();
                temppstmt.close();
            }
            catch(Exception e)
            {
                System.out.println(e);
            }
      

  3.   

    m_response输出"image/jpeg"之后,你可能又输出文本了,比如调用了out.print之类的
    这种图片建议专门有一个servlet去做,然后再jsp里面include它
      

  4.   

    <%@ page  import="DataBaseBean.ConnPool.MyFun"%>
    你这样只是引用 建议你还不如写 useBean
      

  5.   


    或者试下
    <%@ page language="java"  import="DataBaseBean.ConnPool.MyFun"%>
      

  6.   

    according the error message, maybe the error was occured in this
    <%@ page  import="DataBaseBean.ConnPool.MyFun"%>