时间:2020/4/27
前言:创建数据库、编写五个配置文件、引入包和创建文件、创建持久类po、实现DAO、实现service、实现controller、实现页面功能。
百度翻译和百度真的是神器;
一、问题
1- javax.servlet.jsp.PageContext cannot be resolved to a type
原因:缺失servlet.jsp.jar包
解决方法:在build path引入这个包;
教程1:https://www.cnblogs.com/strive-study/p/5098528.html
2HttpServletRequest cannot be resolved to a type
原因:缺失Jsp-api.jar
解决方法:把Tomcat的这个包引入到lib;
教程1:https://blog.51cto.com/tianxingzhe/1679924
3 Element (frame) is obsolete. Its use is discouraged in HTML5 documents.
原因:元素过时;
解决方法:声明
教程1:https://blog.csdn.net/onceing/article/details/75106238
4 Invalid location of tag (input).
原因:输入的位置无效;
教程1:http://blog.sina.com.cn/s/blog_13e82a3820102x03w.html
教程2:https://www.cnblogs.com/sjxbg/p/9378965.html
5 Undefined attribute name (placeholder).
原因:未定义的属性名
解决方法:改声明
教程:https://blog.csdn.net/legendaryhaha/article/details/80208860
6 Request processing failed; nested exception is org.mybatis.spring.
原因:招不到sql文件;
教程:https://blog.csdn.net/tianshuhao/article/details/93376932
7 Classpath entry C:/Users/jsp-api.jar will not be exported or published. Runtime ClassNotFoundExceptions may result.
原因:buildpath中的包为外部导入或者非web-inf目录下的lib文件夹保证的。
解决方法:把把复制到web-inf目录下;
教程1:https://blog.csdn.net/qq_36620997/article/details/83186633
二、总结
归结下来,就是两个主要问题,一个是数据库的缺失,造成服务器500;一个是JSP文件在web-inf目录中,不能被引用。
解决方法:配置数据库MySQL;学习eclipse的使用