摘要:
maven项目打包时报错:Error injecting constructor, java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties at org.apache.maven.plugin 阅读全文
摘要:
<img alt="验证码" src="KaptchaServlet.jpg" onclick="this.src=this.src+'&k='+Math.random();" style="float: right; margin-right: 40px;height: 40px;width: 8 阅读全文
摘要:
<%=request.getContextPath()%>是解决相对路径的问题,可返回站点的根路径。 <a href="<%=request.getContextPath()%>/XXX.jsp"> //这样获得的是绝对路径 <a href="XXX.jsp" mce_href="XXX.jsp"> 阅读全文
摘要:
我的Tomcat版本为9.0 除了idea中要设置Tomcat配置之外: 需要做Tomcat目录下的conf目录修改context.xml文件,将Context标签添加属性 reloadable="true" (注意xml语法,适用英文的双引号) 阅读全文
摘要:
1.打开file Project Structure 2.选则对应模块的依赖,添加library 在弹出的窗口选择Tomcat的类库即可 阅读全文
摘要:
前言:最近重新看Javaweb部分的教程,发现新版idea中普遍没有web.xml, 这是因为现在大部分web项目使用注解配置,而以前普遍使用web.xml文件配置web项目 如何在IDEA中新建一个WEB项目 本文使用的jdk版本为8,Tomcat版本为9.0 1,安装jdk,并配置环境变量 这里 阅读全文
摘要:
注解 元注解: @Target 描述注解能够作用的位置 ElementType: - type 只能定义在类上 - method:作用这方法上 - field 狂牙作用于成员变量中 Retention:描述注解被保留的阶段 RetentionPolicy - Runtime运行阶段 - Source 阅读全文