会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 134133个问题
Python全系列/第二阶段:Python 深入与提高/异常机制 19907楼
Java架构课程/第十六阶段:高并发与负载均衡/大型网站高并发处理 19909楼
Python全系列/第一阶段:AI驱动的Python编程/函数和内存分析 19910楼

1653921337(1).jpg

servletdemo.rar

老师帮我看看

JAVA 全系列/第六阶段:JavaWeb开发/Servlet技术详解 19911楼

matplotlib01.rar

为什么字体还是没有显示出哎?

Python全系列/第十九阶段:数据分析-数据可视化/matplotlib 19913楼

老师遇到状态码500的错误

canvas.png

package com.bjsxt.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;

public class respByteServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doPost(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        /*图片载入*/
        File file=new File("d:/zhw.jpg");
        /*输出流*/
        FileInputStream fis=new FileInputStream("file");
        /*存入数组*/
        byte[] buff=new byte[fis.available()];
        fis.read(buff);/*读数据*/


        /*设置响应类型*/
        resp.setContentType("image/jpeg");
       /*用字节输出流*/
        OutputStream os=resp.getOutputStream();
        os.write(buff);/*写数据*/
        os.flush();
        os.close();
     }1
}
<servlet>
    <servlet-name>respByteServlet</servlet-name>
    <servlet-class>com.bjsxt.servlet.respByteServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>respByteServlet</servlet-name>
    <url-pattern>/byte.do</url-pattern>
</servlet-mapping>

老师麻烦指导一下。。

JAVA 全系列/第六阶段:JavaWeb开发/Servlet技术详解(旧) 19914楼
Python全系列/第一阶段:AI驱动的Python编程/面向对象 19915楼

老师帮忙看看哪里出错了


Exception in thread "main" java.lang.ExceptionInInitializerError

 at com.bjsxt.test.SelectUsersByIdTest.main(SelectUsersByIdTest.java:10)

Caused by: org.apache.ibatis.exceptions.PersistenceException: 

### Error building SqlSession.

### The error may exist in SQL Mapper Configuration

### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.github.pagehelper.PageInterceptor'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.github.pagehelper.PageInterceptor

 at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)

 at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)

 at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:64)

 at com.bjsxt.utils.MybatisUtils.<clinit>(MybatisUtils.java:22)

 ... 1 more

Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.github.pagehelper.PageInterceptor'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.github.pagehelper.PageInterceptor

 at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:122)

 at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:99)

 at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:78)

 ... 3 more

Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.github.pagehelper.PageInterceptor'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.github.pagehelper.PageInterceptor

 at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuil


JAVA 全系列/第六阶段:项目管理与SSM框架/Mybatis 19916楼
JAVA 全系列/第十五阶段:Spring Cloud Alibaba技术栈/Zookeeper 19918楼
Python全系列/第一阶段:AI驱动的Python编程/编程基本概念 19919楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637