一.为什么要访问Servlet API ? Struts2的Action并未与Servlet API进行耦合,这是Struts2 的一个改良,从而方便了单独对Action进行测试.但是对于Web控制器而言,不访问action是不行的,Struts提供了一种比较简单的方式来访问Servlet API . 二.通常我们需要访问的Servlet API 是 HttpSession.HttpservletRequest.ServletContext,分别对应了JSP内置对象 session,reques…
常用的配置参数1. --prefix=/usr/local/php 指定 php 安装目录 install architecture-independent files in PREFIX 默认/usr/local2.--with-config-file-path=PATH php.ini的存放位置 Set the path in which to look for php.ini [PREFIX/lib] --with-config-file-scan-dir=PATH php.ini的扩展目…
本文主要总结一下redis常用的配置参数的用法: 以下参数决定redis运行方式,默认前台运行,修改为yes可以让redis以后台守护进程方式运行 daemonize no 以下参数指定redis的pid文件,当redis以守护进程方式运行时,默认会把pid写入/var/run/redis.pid文件,可以修改 pidfile /var/run/redis.pid 以下参数指定Redis监听端口,默认为6379 port Tips:作者在自己的一篇博文中解释了为什么选用6379作为默认端口,因为…
常用的配置参数1. --prefix=/usr/local/php指定 php 安装目录install architecture-independent files in PREFIX 默认/usr/local 2.--with-config-file-path=PATHphp.ini的存放位置Set the path in which to look for php.ini [PREFIX/lib]--with-config-file-scan-dir=PATHphp.ini的扩展目录Set…
# ---------------------------------- Cluster ----------------------------------- # Use a descriptive name for your cluster: # 集群名称,用于定义哪些elasticsearch节点属同一个集群. cluster.name: bigdata # ------------------------------------ Node ------------------…
一.类型转换器 1.在动作类action中,声明和表单中name属性的值同名的属性,提供get和set方法,struts2就可以通过反射机制,从页面中获取对应的内容 package com.kdyzm.convert; import com.opensymphony.xwork2.ActionSupport; public class TypeConvertAction extends ActionSupport{ private static final long serialVersionU…