
J2EE
J2EE
winrh
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【JavaWeb】Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
报错java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]原因@WebServlet("/xxx")这里路径重复了,检查下原创 2022-05-01 11:26:32 · 372 阅读 · 0 评论 -
【JavaWeb】jstl标签不显示,只展示${xxx}
需要修改web.xml的这里:<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" .原创 2021-08-08 09:24:22 · 370 阅读 · 0 评论 -
【Servlet】response.getWriter().wirte写完不显示?
问题:response.getWriter().wirte写完不显示分析:PrintWriter没有flush解决:PrintWriter pw = response.getWriter();pw.write("<script language=javascript>alert('登录信息有误');window.location='login.html'</script>");pw.flush();...原创 2020-05-21 14:25:14 · 1660 阅读 · 0 评论 -
报错:/ma.jsp (line: [1], column: [45]) The JSP specification requires that an attribute name is preced
报错:/ma.jsp (line: [1], column: [45]) The JSP specification requires that an attribute name is preced分析:jsp标签写的有问题解决:标签的每个属性间需要空格隔开...原创 2020-04-21 20:16:42 · 347 阅读 · 0 评论 -
报错:org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or un
报错:org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect):分析:timestamp的字段一定要有值,并且是日期值,否则hibernate报错解决:把实体类中time...原创 2020-04-19 21:38:15 · 1017 阅读 · 0 评论 -
报错:Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file
报错:Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [D:\eclipse-workp...原创 2020-04-17 20:07:17 · 1206 阅读 · 0 评论 -
【Dwr】使用dwr,系统提示Session Error
问题:系统提示Session Error解决:web.xml里添加 <init-param> <param-name>crossDomainSessionSecurity</param-name> <param-value>false</param-value> </init-param>...原创 2020-04-16 20:42:55 · 298 阅读 · 0 评论 -
Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual tha
问题:Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'case' at line 1; b...原创 2020-03-08 15:34:20 · 3282 阅读 · 0 评论 -
【tomcat】图片上传如何保存在D盘,且从D盘读取图片展示
首先清楚,jsp归jsp的路径,是发布的路径;controller是controller的路径。两者不一样。1. 修改tomcat的server.xml,增加映射路径2. 设置jsp请求的路径3. 网页看到的路径:...原创 2020-02-09 16:18:33 · 649 阅读 · 0 评论 -
【Javaweb】知道jsp报The superclass "javax.servlet.http.HttpServlet" was not found on the Java的原因吗?
当我们的动态web工程没有配置Apache运行时环境时,就会报错:这时候只要右键项目,到build path的configure build path,libraries去add library配置apache即可。那么,为什么要这样?因为找不到HttpServlet这个类,我们配置运行时环境就是为了引用里边的jar包。可以看到,这个运行时环境里有这些jar包,而HttpSer...原创 2020-01-06 15:43:12 · 201 阅读 · 0 评论 -
【javaweb】完整修改项目工程名
1. 关了tomcat2. 删了eclipse的项目(硬盘里的不要删。。)3. 系统目录下改名,再到该项目的.setting的org.eclipse.wst.common.component对应修改名称(这里没改,部署到tomcat会显示旧的工程名)4. 重新导入,右键项目的属性,搜web,看context-root是不是你的项目名,不是就改改...原创 2019-12-23 10:08:05 · 657 阅读 · 0 评论 -
【Javaweb】设置了错误页面后显示不出来
1. 确保页面有一定量的内容,小于512字节会显示成IE浏览器的404页面(Eclipse就是),不过也可以在chrome浏览器等打开。2. error.jsp设置isErrorPage="true",比如:<%@page pageEncoding="UTF-8" isErrorPage="true"%><!DOCTYPE html PUBLIC '-//W3C//D...原创 2019-12-19 14:59:55 · 615 阅读 · 0 评论 -
【Javaweb】servlet两种配置方式
以前我们用servlet是在web.xml里进行个配置的,比如:<servlet> <servlet-name>AddServlet</servlet-name> <servlet-class>com.test.servlet.AddServlet</servlet-class></servlet> &l...原创 2019-12-17 10:38:13 · 326 阅读 · 0 评论 -
【Javaweb】500报错,显示的是明明已经删除的类
导包的import语句没有删除之,ctrl+shift+O解决之原创 2019-12-16 19:45:18 · 346 阅读 · 0 评论 -
【javaWeb】报错: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catal
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/project-3]] at org.apache.catalina.util.LifecycleBase.start(Life...原创 2019-05-10 13:22:17 · 1545 阅读 · 0 评论 -
【javaWeb】报错Unable to compile class for JSP: 尖括号 operator is not allowed for source level below 1.7
报错:org.apache.jasper.JasperException: Unable to compile class for JSP:An error occurred at line: 14 in the jsp file: /app_2/book.jsp'<>' operator is not allowed for source level below 1.7...原创 2019-03-16 15:18:28 · 532 阅读 · 0 评论 -
【javaWeb】在jsp中如何删除指定cookie
<% Cookie tempCookie = null; Cookie[] cookies = request.getCookies(); if(cookies!=null && cookies.length>0){ for(Cookie c:cookies){ if(c.getValue().equal...原创 2019-03-16 15:12:06 · 1796 阅读 · 0 评论 -
【javaWeb】tomcat能正常启动Web应用但无法访问http://localhost:8080,显示404
首先eclipse里面的浏览器访问需要加上http://,不然显示无法访问页面其次,右击服务器,点add and remove,先移除所有web应用再双击Tomcat v7.0 Server at localhost进入页面,看Server Locations点Use Tomcat installation,并且将Deploy path改为webapps,ctrl+s保存,再右击服...原创 2019-03-09 09:42:46 · 9566 阅读 · 0 评论 -
【javaWeb】解决表单两种提交方式提交后的中文值乱码问题
测试文件的放置:1. post请求在a.jsp中这么写 <form action="b.jsp" method="post"> userName: <input type="text" name="userName" /> <input type="submit" value="submit"原创 2019-03-09 10:12:13 · 1191 阅读 · 0 评论 -
【javaWeb】The markup in the document following the root element must be well-formed.
web.xml的标签没有成对写完整原创 2019-03-08 19:21:24 · 1209 阅读 · 0 评论 -
bmob后端云
参加微信小程序大赛的时候找到的,比起腾讯云,比目更加简洁吧,操作更加简单容易上手。个人api访问免费10w次,云函数免费使用个把月,新手福利。bmob的数据库只支持csv、json的导入。腾讯云里面有phpmyadmin免费数据库,可以在线编辑,支持都格式的导入导出,比bmob的更大型。...原创 2018-05-26 19:06:57 · 933 阅读 · 0 评论 -
【SSM】让控制器方法参数能传多个类的对象(更新Spring Boot做法)
目录一、原因二、做法3. 自实现HandlerMethodArgumentResolver,自定义注解(更接近底层)(1)实现HandlerMethodArgumentResolver解析前端传来的Json(2)在spring-mvc.xml配置该解析器(3)自定义注解(4)控制器使用(5)前端Ajax一、原因@RequestBody只能搞一个二、做法1. 定义一个类,其字段引用其他类(强行聚合,不妥)2. 控制器方法参数列表中使用@RequestBo原创 2020-08-25 11:52:28 · 787 阅读 · 0 评论 -
【SSM】前后端使用JSON传输
1. 导入依赖 <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.47</version> </dependency>2. 在spring-mvc.xml配置转换器原创 2020-08-24 15:35:51 · 595 阅读 · 1 评论 -
【SpringMVC】mvc:exclude-mapping不起作用
原来配置<mvc:exclude-mapping path="/user/page/login" />需要改成<mvc:exclude-mapping path="/**/user/page/login" />原创 2020-08-18 16:35:50 · 1041 阅读 · 0 评论 -
【报错】javax.servlet.http不存在
报错内容:javax.servlet不存在解决方法:属于servet-api.jar,tomcat就有,不要maven导入。右键项目打开模块设置到库添加查找tomcat安装目录的lib下的servet-api.jar原创 2020-08-18 14:16:18 · 339 阅读 · 0 评论 -
报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.mapper.Staff
报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.mapper.StaffMapper.selectPage解决:applicationContext.xml添加mybatis-plus插件设置<bean id="sqlSessionFactory"...原创 2020-03-18 15:34:16 · 304 阅读 · 0 评论 -
报错:org.apache.ibatis.executor.ExecutorException: No constructor found in com.mental.bean.Appointment
报错内容:org.apache.ibatis.executor.ExecutorException: No constructor found in com.mental.bean.Appointment matching [java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.sql....原创 2020-03-17 09:51:15 · 195 阅读 · 0 评论 -
【ssm】出现400bad request,没有报错
考虑传参的时候,参数类型有问题:原创 2020-02-10 16:03:16 · 491 阅读 · 0 评论 -
【Mybatis】报错:org.apache.ibatis.type.TypeException: The alias 'Collection' is already mapp
jar包有同类名,冲突了。加个别名就好了import org.apache.ibatis.type.Alias;@Alias("tb_collection")public class Collection {}原创 2020-02-06 15:10:45 · 2162 阅读 · 1 评论 -
【Struts2】快速搭建struts2(附代码)
1. 下载jar包到该位置(https://github.com/winRh/csdn/blob/master/lib.rar):2. 在src包下创建struts.xml<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//D...原创 2019-11-30 17:20:37 · 249 阅读 · 0 评论 -
【J2EE】简述IOC
本文是https://blog.youkuaiyun.com/ivan820819/article/details/79744797读后感,详情点链接。① 首先,在面向对象设计的软件系统中,它的底层都是由N个对象构成的,各个对象之间通过相互合作,最终实现系统地业务逻辑。② 但是,伴随着工业级应用的规模越来越庞大,对象之间的依赖关系也越来越复杂,经常会出现对象之间的多重依赖性关系。③ 此时,IOC出现,...转载 2019-07-08 18:06:32 · 588 阅读 · 0 评论 -
【spring】自动装配Bean的三注解: @Autowired、@Resource、@Inject
<context:component-scan>元素会自动注册AutowiredAnnotationBeanPostProcessor实例,该实例可以自动装配具有@Autowired、@Resource、@Inject注解的属性。一、@Autowired1、@Autowired是根据类型进行自动装配的,如果需要按名称进行装配,则需要配合@Qualifier;(@Qualifie...转载 2019-07-09 08:40:52 · 724 阅读 · 0 评论 -
【spring】报错:Exception sending context initialized event to listener instance of class org.springframe
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error creating...原创 2019-05-03 16:42:08 · 1667 阅读 · 3 评论 -
【spring】报错:java.lang.NoClassDefFoundError: org/springframework/aop/TargetSource
使用组件扫描时报错:信息: Loading XML bean definitions from class path resource [annotation.xml]Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception ...原创 2019-04-23 16:13:45 · 820 阅读 · 0 评论 -
【hibernate】报错:could not resolve property: ID of: com.test.entities.Employee [DELETE FROM ...
hql语句中,字段ID与域属性id不一致,区分大小写。换成小写就行。原创 2019-05-03 20:23:08 · 1517 阅读 · 0 评论 -
【hibernate】报错:Employees is not mapped
在HQL查询中,表名写成数据库表名Employees了,而实体类类名是Employee,HQL 查询语句中的主体是域模型中的类及类的属性。因此改过来就行了。原创 2019-05-03 16:11:05 · 624 阅读 · 0 评论 -
【hibernate】报错:Field 'id' doesn't have a default value
我数据库用的是Mysql,表中id没有设置自增。(Oracle不允许自增)原创 2019-04-19 10:49:49 · 451 阅读 · 0 评论 -
【MySQL】报错:org.hibernate.exception.SQLGrammarException: could not execute statement
在学映射多对一时,因为表名起为order而报错(是MySQL关键字):Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL serv...原创 2019-04-21 16:19:59 · 807 阅读 · 0 评论 -
【Java EE】用SSM框架搭建项目的完整记录(大学作业)
项目 思路po包里是实体类service里是业务逻辑类请求页面放在webcontent里面,如index.jsp,写个<a href="控制器类映射名"></a>,给springmvc控制器类,具体业务交给业务层service,给service.impl,涉及数据库操作,Dao->Dao.xml里,resultsType返回类型,结果返回业务层im...原创 2019-01-12 19:13:56 · 4747 阅读 · 2 评论 -
【Java EE】用Easyui框架开发项目
解决问题: Eclipse怎么引用Easyui? Easyui显示不出来? 1.把Easyui解压缩文件放到WebContent目录下;2.在引用它的jsp文件里写上标签,如<link href="Easyui/themes/icon.css" rel="stylesheet" type="text/css" />,这里jsp是放在WebContent目...原创 2019-01-12 18:22:53 · 648 阅读 · 0 评论