自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 收藏
  • 关注

原创 Solr-1-Quick Start-按官方学习教程

参考:http://lucene.apache.org/solr/Solr Quick Startrequirementrequirement Java 8+download solr6.3.0Getting Started将安装目录的bin目录D:\solr-6.3.0\bin添加到系统环境变量Pathbin/solr start -e cloud -noprompt在浏览器输入h

2017-04-27 14:24:34 318

原创 Struts-Tags(标签)-1

通用标签propertysetbeanincludeparamdebug控制标签if elseif elseiteratorsubsetUI标签 1.

2017-04-21 17:28:59 367

原创 Struts-OGNL-3

JSP中<%--注意该项在Struts2.5中不能生效,在struts2.1.6中可以 显示age=8--%><%--http://localhost:8080/hello/ognl/ognl 在User类中重写toString()即可--%><li>访问普通属性的构造方法:</li><s:property value="new dto.User(8)"></s:property><br

2017-04-21 16:39:48 279

原创 Struts-OGNL-2

jsp中<%--不要忘了配置文件中 <constant name="struts.ognl.allowStaticMethodAccess=false" value="true" /> 参数名字可以在default.properties文件中查--%><li>访问静态方法:</li><s:property value="@com.ognl.OgnlAction@staticMethod()

2017-04-20 23:20:04 229

原创 Struts-OGNL-1

Object-Graph Navigation Language.对象图形化导航语言JSP中<%--http://localhost:8080/hello/ognl/ognl?userName=18--%><li>访问值栈中的action的普通属性:</li><s:property value="userName"></s:property><br><%--http://localhost:80

2017-04-20 17:58:04 218

原创 Struts标签-

Control Tags(控制型的标签):ifelseifelseappendgeneratoriteratormergesortsubsetData Tags 1. a 2. action 3. bean 4. date 5. debug 6. i18n 7. include 8. param 9. property 10. push

2017-04-20 16:34:52 273

原创 Struts2-ResultType-4-带参数的结果集

场景:在请求的URL中传参,之后参数显示在jsp中如果result的type是forward类型(type=dispatcher/chain),则共享值栈(因为相当于只有一次request请求),不需要在xml中取参数值 xml中<action name="r1" > <result>/resultParam.jsp</result> </action>

2017-04-20 14:59:57 252

原创 Maven生命周期

1.Maven最重要的两项内容:生命周期:可参考博客http://juvenshun.iteye.com/blog/213959                    官网关于生命周期的解释:http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html先编译,再测试(针对te

2017-04-20 14:17:45 228

原创 Struts2-ResultType-3-动态结果集(dynamic_Results)

用在Struts文件中的OGNL表达式,了解即可 “$”用于从ValueStack取值 根据“r”的不同值,跳转到不同页面。public class DynamicAction extends ActionSupport{ private String r; public String execute() throws Exception {// r="/index

2017-04-19 15:57:26 430

原创 Struts2-ResultType-2-全局结果集(Global_Results)

<!--http://localhost:8080/hello/global/g1--> <!--展示index.jsp--> <package name="globalResult" namespace="/global" extends="struts-default" > <global-results> <result name="mainp

2017-04-19 14:06:06 320

原创 Struts2-ResultType-1-结果类型

前两种常用,前四种了解,其他不常用(后面会仔细研究,用到再说) 1. dispatcher (常用,服务器端跳转,浏览器的访问地址对客户透明) 不配的话,默认是dispatcher(用服务器跳转到结果页面jsp,html,freemarker页面,但不能是action) 2. redirect 客户端跳转,跳转到页面 3. chain 用forward的方式,访问action 4.

2017-04-19 10:56:29 287

原创 Struts2-Action-8-系列问题(包含模块配置文件、defaultAction)

11.包含模块配置文件 struts.xml文件中可包含多个struts.xml文件<struts> <include file="struts-1.xml"></include></struts>12.默认action(default action) 效果:访问http://localhost:8080/hello/相当于访问http://localhost:8080/hello

2017-04-18 23:28:43 280

原创 Struts2-Action-7-系列问题(Action中的web元素访问)

10.action中访问web元素(access web elements) 取得Map类型request,session,application,真实类型HttpServletRequest,HttpSession,ServletContex的引用 1.前三者:依赖于容器( map类型) 2.前三者:IOC // 一般只用这种( map类型) 3.后三者:依赖于容器(真实类型)

2017-04-18 17:38:45 290

原创 Struts2-Action-6-系列问题(乱码问题解决、简单数据校验)

8.乱码问题解决 //在struts2.5中不存在中文问题(使用过滤器)<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> </f

2017-04-18 15:09:37 280

原创 Struts2-Action-5-系列问题(接受用户输入(3种方式))

7.接受用户输入(3种方式) 8.乱码问题解决 9.简单数据校验 10.action中访问web元素 11.包含模块配置文件 12.默认action

2017-04-18 14:01:56 290

原创 Struts2-Action-4-系列问题(路径、调用Action的自定义方法、通配符)

4.路径设置Struts中的路径问题是根据action的路径而不是通过jsp的路径来确定,所以尽量不要使用相对路径。虽然可以使用redirect方式解决,但redirect方式非必要。解决的办法非常简单,统一使用绝对路径(在jsp中使用request.getContextPath()方式拿到webapp的路径,或者在jsp的head标签中指定”/>)说明:如果当前url路径是http://local

2017-04-18 10:25:41 624

原创 Struts2-Action-3-系列问题(作用、namespace、定义自己的action)

Action入门: Struts作用: 把请求和视图分开Namespace namespace决定了action的访问路径,默认为“”,表示可以接收所有路径的action namespace可以写为/,或者/xx,或者/xx/yy,对应的action访问路径为/index.action,/xx/index.action,/xx/yy/index.action namespace最好也用模块

2017-04-17 22:20:20 458

原创 struts2-Action-2-访问实现过程

struts.xml文件不给提示的时候 settings-搜索catalog

2017-04-17 17:16:24 268

原创 struts2-Action-1-示例

1. 创建一个带有maven的web项目(可参考如何创建带有maven的web项目) 2. 配置struts.xml<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"

2017-04-17 16:00:24 413

原创 Spring DataSource

DBCPC3P0(在hibernate中也可以配 ApplicationServer中配JNDI(常用))proxool<!--方式1--> <!-- don't forget the DataSource --> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-met

2017-04-17 10:57:27 273

原创 第18章 类加载机制与反射-JDK动态代理

两个重点: Proxy类和InvocationHandler接口 1.定义接口 2.定义动态代理的对象,该对象实现接口 3.定义通用方法的类,该类中定义通用方法(例如记录开始日志方法,结束日志方法) 4.定义实现InvocationHandler的方法(调用通用方法,使用反射调用被代理对象的方法) 5.定义动态代理对象工厂类,即根据target生成动态代理对象 6.测试// 1.定义接

2017-04-16 23:13:45 235

原创 Spring AOP xml

针对Spring的AOP来讲,使用xml方式比annotation的方式更好(因为经常切面的逻辑会使用第三方的代码,即没有源码的情况,使用xml更加方便)<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://

2017-04-16 22:54:54 249

原创 Spring AOP Annotaion

aop Spring Annotaion将下面的标签加入Spring的xml中(注意添加对应的scama) /** * Created by liudy on 17/4/16. * Aspect-Oriented-Programming * 面向切面编程,是对面向对象的思维方式的有力补充 * 如果被代理的对象没有实现接口,那么spring aop会使用CGLIB来产生动态代理的对象,那么需

2017-04-16 22:08:48 394

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除