- synchronized锁升级过程
liang8999
javajvm开发语言
一、synchronized锁加到什么地方synchronized上锁,其实锁信息是加在对象头中的markdown,对象中的前四个字节表示markdown;markdown还记录了对象的gc、hashcode信息注意:markdown结构与jvm虚拟机的实现有关,I)32位Hotspot虚拟机markdown结构如下:II)64位Hotspot虚拟机的markdown结构如下:二、synchron
- mac 版本Jmeter安装教程
weixin_58693614
macosjmeterjava
1.确认是否安装JDK*打开终端->输入java-version(注意空格)会出现版本信息javaversion"16.0.1"2021-04-20Java(TM)SERuntimeEnvironment(build16.0.1+9-24)JavaHotSpot(TM)64-BitServerVM(build16.0.1+9-24,mixedmode,sharing)2.若没有安装,移步官网下载安
- clickhouse-v24.1-离线部署
Wonderful呀
数据库clickhouse数据库运维linux
部署版本数据库版本:24.1.1.2048jdk版本:jdk84个文件(三个ck的包):OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tarclickhouse-client-24.1.1.2048.x86_64.rpmclickhouse-common-static-24.1.1.2048.x86_64.rpmclickhouse-server-24.1.1.
- 读书笔记:《深入理解Java虚拟机》(8)
Violet永存
读书笔记java开发语言jvm
虚拟机性能监控、故障处理工具JDK命令行工具这些命令在JDK安装目录下的bin目录下:jps(JVMProcessStatus):类似UNIX的ps命令。用于查看所有Java进程的启动类、传入参数和Java虚拟机参数等信息;jstat(JVMStatisticsMonitoringTool):用于收集HotSpot虚拟机各方面的运行数据;jinfo(ConfigurationInfoforJava
- JDK成长记16:从0分析你不知道的synchronized底层原理(下)
_程序员成长记
file上一节你了解了什么是CAS、synchronized形成的锁的类型、重量级锁是用户态进程向内核态申请资源加锁过程,HotSpotJava对象结构,以及初步从3个层面分析了下synchronized的核心流程。还记得核心流程图么?如下所示:file这一节我们仔细来分析下这个过程中,每一步的底层原理。我们需要用到一个工具包,JOL,它可以将java对象的信息打印出来。你可以通过这个工具分析升级
- JAVA之JVM入门
java_heartLake
JAVAjavajvm
Java虚拟机(JVM)是Java平台的核心部分之一,它为Java程序提供了运行环境。一、历史背景1.SunClassicVM发布时间:1996年重要功能:Java1.0的默认JVM。支持基本的字节码执行。简单的垃圾回收机制。2.HotSpotVM发布时间:1999年重要功能:JDK1.3开始成为默认JVM。引入了即时编译器(JITCompiler)。提供了多种垃圾收集器。支持线程调度和同步性能的
- 方法区的垃圾回收
climb.xu
jvmjava
方法区的垃圾回收有人认为方法区(如HotSpot虚拟机中元空间或者永久代)是没有垃圾收集行为的,其实不然,Java虚拟机规范中堆方法区的约束是非常宽松的,提到过可以不要求虚拟机在方法区中实现垃圾收集,事实上也确实有未实现或未能完整实现方法区类型卸载的垃圾收集器存在(如JDK11时期的ZGC收集器就不支持类卸载)一般来说这个区域的回收效果比较难令人满意,尤其是类型的卸载,条件相当苛刻,但是这部分区域
- 方法区【JVM】
码农回忆录
JVM方法区常量池JVM
JVM-方法区1.方法区的作用当类加载器加载完成类之后,会将类信息、运行时常量池、静态变量(此处指的是指针,如果是一个对象对象的分配还是在堆中)等存储在方法区;但在JDK不同版本对字符串常量和静态变量的存储有所不同,这部分内容后续列出2.不同版本的方法区JDK6:在JDK6以前方法区也就是HotSpot虚拟机中的永久代,此时类信息、运行时常量池、静态变量等存储在方法区JDK7:在JDK7中法区也是
- JVM 自动内存管理 知识点梳理
10419
知识点梳理思考Javajavajvm内存管理
JVM自动内存管理Java内存区域HotSpot虚拟机对象探秘垃圾收集器与内存分配策略哪些内存需要回收?(对象已死?)垃圾收集算法HotSpot的算法细节实现经典垃圾收集器CMSG1低延迟垃圾收集器引用你好!这是我对于JVM自动内存管理相关知识点的梳理与思考,希望对你能有所帮助;菜鸟萌新,问题多多,欢迎指出,谢谢!本文章以图为主,如果文章中没有图片,麻烦移步:链接.Java内存区域HotSpot虚
- 深入浅出JVM(一)之Hotspot虚拟机中的对象
后端
本篇文章思维导图对象的创建对象的创建可以分为五个步骤:检查类加载,分配内存,初始化零值,设置对象头,执行实例构造器类加载检查HotSpot虚拟机遇到一条new指令,会先检查能否在常量池中定位到这个类的符号引用,检查这个类是否类加载过没有类加载过就去类加载类加载过就进行下一步分配内存分配内存对象所需的内存在类加载完成后就可以完全确定分配内存方式虚拟机在堆上为新对象分配内存,有两种内存分配的方式:指针
- 【JVM篇】什么是类加载器,有哪些常见的类加载器
在下小吉.
JVMjvmpython开发语言
文章目录什么是类加载器有哪些常见的类加载器什么是类加载器负责在类加载过程中,将字节码信息以流的方式获取并加载到内存当中有哪些常见的类加载器启动类加载器启动类加载器是有Hotspot虚拟机通过的类加载器,加载核心类默认加载Java安装目录/jre/lib下面的类文件扩展类加载器扩展类加载器是jdk中提供的,是使用Java编写的类加载器,加载扩展类默认加载Java安装目录/jre/lib/ext下的类
- JVM工作原理与实战(三十八):JIT即时编译器原理
橘子-青衫
JVM工作原理与实战javajvm后端架构
专栏导航JVM工作原理与实战RabbitMQ入门指南从零开始了解大数据目录专栏导航前言一、JIT即时编译器二、HotSpot中的JIT编译器三、JIT优化技术1.方法内联2.逃逸分析四、JIT优化建议总结前言JVM作为Java程序的运行环境,其负责解释和执行字节码,管理内存,确保安全,支持多线程和提供性能监控工具,以及确保程序的跨平台运行。本文主要介绍了JIT即时编译器、HotSpot中的JIT编
- 关于jvm中的安全点的理解
今天不想掉头发
>中说道GCRoots的节点主要在全局的引用(例如常量或类静态属性)与执行上下文(例如栈帧中的本地变量表)中,但是进行根节点枚举的时候我们并不需要一个不漏地检查完所有执行上下文和全局引用位置,HotSpot中通过使用一组称为OopMap的数据结构,用于直接存放对象引用,类加载完成,HotSpot就会把对象内某个偏移位置是否为对象引用记录下来,JIT编译过程中,也会在特定的位置记录下栈和局存起中哪些
- Java基础-JVM内存管理-HotSpot对象
HughJin
Java工程师知识树/Java基础HotSpot中的对象Java是一门面向对象的编程语言,在Java程序运行过程中时时刻刻都有对象被创建出来。在语言层面上,创建对象(例如克隆、反序列化)通常仅仅是一个new关键字而已,而在虚拟机中,对象(这里指普通Java对象,不包括数组和Class对象等)的创建又是怎样一个过程呢?对象的创建首先我们虚拟机在遇到new的指令时会检查是否能在常量池中找到这个类的符号
- Java 三大并大特性-可见性介绍(结合代码、分析源码)
夜夜流光相皎洁_小宁
Java技术java高并发多线程可见性jvmhotspot
目录编辑一、可见性概念1.1概念二、可见性问题由来2.1由来分析三、可见性代码例子3.1代码3.2执行结果四、Java中保证可见性的手段4.1volatile4.1.1优化代码4.1.2测试结果4.1.3volatile原理分析4.1.3.1查看字节码4.1.3.2hotspot层面4.1.3.3volatile原理总结4.2synchronized4.2.1代码优化4.2.2测试结果4.2.3s
- iOS 应用内一键连接Wi-Fi
小柴2011
项目背景:应用内一键连接Wi-Fi(已知SSID和密码),不需要跳转偏好设置页面点击连接。1,⚠️只支持iOS11.0及以上在General->Deploymentinfo->Deploymenttarget2,在buildPhass->LinkBinayWithLibraries引入框架NetworkExtension.framework3,在Capabilities中打开hotspotConf
- 解决jstack的报错:Unable to open socket file
java
原文网址:解决jstack的报错:Unabletoopensocketfile_IT利刃出鞘的博客-CSDN博客简介说明本文介绍解决jstack的报错的方法,报错信息为:Unabletoopensocketfile。分享Java技术星球:自学精灵-IT技术星球详细报错信息:进程号:Unabletoopensocketfile:targetprocessnotrespondingorHotSpotV
- HotSpot初始化
王侦
openjdk9JVM启动调试介绍了从Launcher到主线程的整个初始化运行过程。这一篇集中介绍主线程中InitializeJVM最终调用Threads::create_vm初始化hotspot虚拟机各个模块的过程。1.hotspot各模块└──vmHotSpotVM的核心代码├──adlc平台描述文件(上面的cpu或os_cpu里的*.ad文件)的编译器├──asm汇编器接口├──c1clie
- Gradle IDEA 乱码
混世小萌羊
Gradleintellij-ideajavaide
文章目录环境代码测试结果配置JAVA_TOOL_OPTIONS配置build.gradle.kts配置idea64.exe.vmoptions无配置总结问题链接环境Java环境javaversion"21.0.2"2024-01-16LTSJava(TM)SERuntimeEnvironment(build21.0.2+13-LTS-58)JavaHotSpot(TM)64-BitServerVM
- Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option ...
程序员牛牛
首先使用ps-ef查询java进程号:linux-h4j5:/opt/aiservice/jdk/bin#ps-ef|grepjavaroot2503724942018:55pts/100:00:00grepjavaai2621610Mar27?01:47:40/opt/aiservice/jdk/bin/java-cp.org.springframework.boot.loader.WarLau
- jvm垃圾收集器之七种武器
黄晓琪
jvm
目录1.回收算法1.1标记-清除算法(Mark-Sweep)1.2复制算法(Copying)1.3标记-整理算法(Mark-Compact)2.HotSpot虚拟机的垃圾收集器2.1新生代的收集器Serial收集器(复制算法)ParNew收集器(复制算法)ParallelScavenge收集器(复制算法)2.2老年代的收集器SerialOld收集器(标记-整理算法)ParallelOld收集器(标
- 垃圾收集器与内存分配策略
join_a922
一、GC收集器1、GC回收需要思考的三件事:a)如何判断哪些内存需要回收?b)用什么回收?c)什么时候进行回收?以下分别针对这个几个问题进行说明。问题1:如何判断哪些内存需要回收?判断方法有两种(HotSpot默认采用第二种):1.引用计数算法给对象添加一个引用计数器,每当一个地方引用它时,计数器值就加1;当引用失效时,计数器值就减1;任何时刻计数器都为0的对象就是不可能再被使用的。2.根搜索算法
- NullPointerException异常丢失堆栈信息
醉里挑灯看剑422
问题描述手下一个项目,日志中存在以下没有任何堆栈信息的异常:这是Hotspot虚拟机的fastthrow机制对抛出异常的优化导致。当nullpointer、除零等异常在相同位置抛出一定多次后,优化机制会去掉堆栈信息缩短抛出流程的时间。solution增加启动参数:-XX:-OmitStackTraceInFastThrow。例:命令行方式java-XX:-OmitStackTraceInFastT
- jvm内存分区的变化
星光不问赶路人-
面试JVMjavajvm
随着JDK版本的变化,JVM内存分区方面有一些变化和调整。以下是主要的一些变化:JDK8之前:在JDK8之前,HotSpot虚拟机主要使用的是永久代(PermanentGeneration)和堆内存(HeapMemory),其中永久代主要用于存储类的元数据、方法区、常量池等。具体内存分区如下:堆内存(HeapMemory):主要用于存储对象实例和数组对象。可以通过-Xms和-Xmx参数调整初始堆大
- RocketMQ启动报错解决:Using the DefNew young collector with the CMS collector is deprecated and will likely
fyihdg
rocketmqjavajava开发语言
启动nameserver报错了,如下[root@localhost~]#mqnamesrvJavaHotSpot(TM)64-BitServerVMwarning:UsingtheDefNewyoungcollectorwiththeCMScollectorisdeprecatedandwilllikelyberemovedinafuturereleaseJavaHotSpot(TM)64-Bit
- JVM 性能调优 - JVM 参数基础(2)
magic_kid_2010
jvm性能调优jvm基础参数jvm调优java
查看JDK版本$java-versionjavaversion"1.8.0_151"Java(TM)SERuntimeEnvironment(build1.8.0_151-b12)JavaHotSpot(TM)64-BitServerVM(build25.151-b12,mixedmode)查看Java帮助文档$java-help用法:java[-options]class[args...](执行
- Graal编译器和GraalVM虚拟机
缘友一世
jvm开发语言JVMgraalVM
文章目录说明Java程序执行流程JVM的语言无关性JVM的执行流程执行引擎的两种行为:解释执行和编译热点代码和热点代码探测方式热点代码热点代码探测方式热点代码探测方式流程HotSpotVM内嵌两个JIT编译器Graal编译器GraalVMGraalVM虚拟机安装和体验GraalVM的下载和安装配置安装VisualStudioGraalVM初体验说明本文章学习自Java新一代Graal编译器和Gra
- 【Java八股文面试系列】JVM-内存区域
叮咚Zz
python开发语言javajvmjava-eeintellij-idea
目录Java内存区域运行时数据区域线程独享区域程序计数器Java虚拟机栈StackFlowError&OOM本地方法栈线程共享区域堆GCR-分代回收算法字符串常量池方法区运行时常量池HotSpot虚拟机对象探秘对象的创建对象的内存布局句柄Java内存区域运行时数据区域Java虚拟机在执行Java程序的过程中会把它管理的内存划分成若干个不同的数据区域。JDK1.8和之前的版本略有不同,我们这里以JD
- 怎么在Linux下改变JMeter内存
左子穆
1.找到相应的bin目录下面的jmeter文件2.启动出现:JavaHotSpot(TM)64-BitServerVMwarning:INFO:os::commit_memory(0x00000000c0000000,1073741824,0)failed;error='Cannotallocatememory'(errno=12)##Thereisinsufficientmemoryforthe
- JVM_01_程序计数器 虚拟机栈
学心理学的猫
JVM学习专栏jvmjava开发语言
1.什么是JVM?定义:JavaVirtualMachine-java程序的运行环境(java二进制字节码的运行环境)好处:一次编写,到处运行自动内存管理,垃圾回收功能数组下标越界检查2.常见的JVM注意:我们所使用的是HotSpot1、程序计数器(寄存器)作用:程序计数器用于保存JVM中下一条所要执行的指令的地址注意:程序计数器是存储在寄存器(读取非常快)中的因为程序计数器要经常做读操作2.特点
- 统一思想认识
永夜-极光
思想
1.统一思想认识的基础,才能有的放矢
原因:
总有一种描述事物的方式最贴近本质,最容易让人理解.
如何让教育更轻松,在于找到最适合学生的方式.
难点在于,如何模拟对方的思维基础选择合适的方式. &
- Joda Time使用笔记
bylijinnan
javajoda time
Joda Time的介绍可以参考这篇文章:
http://www.ibm.com/developerworks/cn/java/j-jodatime.html
工作中也常常用到Joda Time,为了避免每次使用都查API,记录一下常用的用法:
/**
* DateTime变化(增减)
*/
@Tes
- FileUtils API
eksliang
FileUtilsFileUtils API
转载请出自出处:http://eksliang.iteye.com/blog/2217374 一、概述
这是一个Java操作文件的常用库,是Apache对java的IO包的封装,这里面有两个非常核心的类FilenameUtils跟FileUtils,其中FilenameUtils是对文件名操作的封装;FileUtils是文件封装,开发中对文件的操作,几乎都可以在这个框架里面找到。 非常的好用。
- 各种新兴技术
不懂事的小屁孩
技术
1:gradle Gradle 是以 Groovy 语言为基础,面向Java应用为主。基于DSL(领域特定语言)语法的自动化构建工具。
现在构建系统常用到maven工具,现在有更容易上手的gradle,
搭建java环境:
http://www.ibm.com/developerworks/cn/opensource/os-cn-gradle/
搭建android环境:
http://m
- tomcat6的https双向认证
酷的飞上天空
tomcat6
1.生成服务器端证书
keytool -genkey -keyalg RSA -dname "cn=localhost,ou=sango,o=none,l=china,st=beijing,c=cn" -alias server -keypass password -keystore server.jks -storepass password -validity 36
- 托管虚拟桌面市场势不可挡
蓝儿唯美
用户还需要冗余的数据中心,dinCloud的高级副总裁兼首席营销官Ali Din指出。该公司转售一个MSP可以让用户登录并管理和提供服务的用于DaaS的云自动化控制台,提供服务或者MSP也可以自己来控制。
在某些情况下,MSP会在dinCloud的云服务上进行服务分层,如监控和补丁管理。
MSP的利润空间将根据其参与的程度而有所不同,Din说。
“我们有一些合作伙伴负责将我们推荐给客户作为个
- spring学习——xml文件的配置
a-john
spring
在Spring的学习中,对于其xml文件的配置是必不可少的。在Spring的多种装配Bean的方式中,采用XML配置也是最常见的。以下是一个简单的XML配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.or
- HDU 4342 History repeat itself 模拟
aijuans
模拟
来源:http://acm.hdu.edu.cn/showproblem.php?pid=4342
题意:首先让求第几个非平方数,然后求从1到该数之间的每个sqrt(i)的下取整的和。
思路:一个简单的模拟题目,但是由于数据范围大,需要用__int64。我们可以首先把平方数筛选出来,假如让求第n个非平方数的话,看n前面有多少个平方数,假设有x个,则第n个非平方数就是n+x。注意两种特殊情况,即
- java中最常用jar包的用途
asia007
java
java中最常用jar包的用途
jar包用途axis.jarSOAP引擎包commons-discovery-0.2.jar用来发现、查找和实现可插入式接口,提供一些一般类实例化、单件的生命周期管理的常用方法.jaxrpc.jarAxis运行所需要的组件包saaj.jar创建到端点的点到点连接的方法、创建并处理SOAP消息和附件的方法,以及接收和处理SOAP错误的方法. w
- ajax获取Struts框架中的json编码异常和Struts中的主控制器异常的解决办法
百合不是茶
jsjson编码返回异常
一:ajax获取自定义Struts框架中的json编码 出现以下 问题:
1,强制flush输出 json编码打印在首页
2, 不强制flush js会解析json 打印出来的是错误的jsp页面 却没有跳转到错误页面
3, ajax中的dataType的json 改为text 会
- JUnit使用的设计模式
bijian1013
java设计模式JUnit
JUnit源代码涉及使用了大量设计模式
1、模板方法模式(Template Method)
定义一个操作中的算法骨架,而将一些步骤延伸到子类中去,使得子类可以不改变一个算法的结构,即可重新定义该算法的某些特定步骤。这里需要复用的是算法的结构,也就是步骤,而步骤的实现可以在子类中完成。
 
- Linux常用命令(摘录)
sunjing
crondchkconfig
chkconfig --list 查看linux所有服务
chkconfig --add servicename 添加linux服务
netstat -apn | grep 8080 查看端口占用
env 查看所有环境变量
echo $JAVA_HOME 查看JAVA_HOME环境变量
安装编译器
yum install -y gcc
- 【Hadoop一】Hadoop伪集群环境搭建
bit1129
hadoop
结合网上多份文档,不断反复的修正hadoop启动和运行过程中出现的问题,终于把Hadoop2.5.2伪分布式安装起来,跑通了wordcount例子。Hadoop的安装复杂性的体现之一是,Hadoop的安装文档非常多,但是能一个文档走下来的少之又少,尤其是Hadoop不同版本的配置差异非常的大。Hadoop2.5.2于前两天发布,但是它的配置跟2.5.0,2.5.1没有分别。 &nb
- Anychart图表系列五之事件监听
白糖_
chart
创建图表事件监听非常简单:首先是通过addEventListener('监听类型',js监听方法)添加事件监听,然后在js监听方法中定义具体监听逻辑。
以钻取操作为例,当用户点击图表某一个point的时候弹出point的name和value,代码如下:
<script>
//创建AnyChart
var chart = new AnyChart();
//添加钻取操作&quo
- Web前端相关段子
braveCS
web前端
Web标准:结构、样式和行为分离
使用语义化标签
0)标签的语义:使用有良好语义的标签,能够很好地实现自我解释,方便搜索引擎理解网页结构,抓取重要内容。去样式后也会根据浏览器的默认样式很好的组织网页内容,具有很好的可读性,从而实现对特殊终端的兼容。
1)div和span是没有语义的:只是分别用作块级元素和行内元素的区域分隔符。当页面内标签无法满足设计需求时,才会适当添加div
- 编程之美-24点游戏
bylijinnan
编程之美
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
public class PointGame {
/**编程之美
- 主页面子页面传值总结
chengxuyuancsdn
总结
1、showModalDialog
returnValue是javascript中html的window对象的属性,目的是返回窗口值,当用window.showModalDialog函数打开一个IE的模式窗口时,用于返回窗口的值
主界面
var sonValue=window.showModalDialog("son.jsp");
子界面
window.retu
- [网络与经济]互联网+的含义
comsci
互联网+
互联网+后面是一个人的名字 = 网络控制系统
互联网+你的名字 = 网络个人数据库
每日提示:如果人觉得不舒服,千万不要外出到处走动,就呆在床上,玩玩手游,更不能够去开车,现在交通状况不
- oracle 创建视图 with check option
daizj
视图vieworalce
我们来看下面的例子:
create or replace view testview
as
select empno,ename from emp where ename like ‘M%’
with check option;
这里我们创建了一个视图,并使用了with check option来限制了视图。 然后我们来看一下视图包含的结果:
select * from testv
- ToastPlugin插件在cordova3.3下使用
dibov
Cordova
自己开发的Todos应用,想实现“
再按一次返回键退出程序 ”的功能,采用网上的ToastPlugins插件,发现代码或文章基本都是老版本,运行问题比较多。折腾了好久才弄好。下面吧基于cordova3.3下的ToastPlugins相关代码共享。
ToastPlugin.java
package&nbs
- C语言22个系统函数
dcj3sjt126com
cfunction
C语言系统函数一、数学函数下列函数存放在math.h头文件中Double floor(double num) 求出不大于num的最大数。Double fmod(x, y) 求整数x/y的余数。Double frexp(num, exp); double num; int *exp; 将num分为数字部分(尾数)x和 以2位的指数部分n,即num=x*2n,指数n存放在exp指向的变量中,返回x。D
- 开发一个类的流程
dcj3sjt126com
开发
本人近日根据自己的开发经验总结了一个类的开发流程。这个流程适用于单独开发的构件,并不适用于对一个项目中的系统对象开发。开发出的类可以存入私人类库,供以后复用。
以下是开发流程:
1. 明确类的功能,抽象出类的大概结构
2. 初步设想类的接口
3. 类名设计(驼峰式命名)
4. 属性设置(权限设置)
判断某些变量是否有必要作为成员属
- java 并发
shuizhaosi888
java 并发
能够写出高伸缩性的并发是一门艺术
在JAVA SE5中新增了3个包
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks
在java的内存模型中,类的实例字段、静态字段和构成数组的对象元素都会被多个线程所共享,局部变量与方法参数都是线程私有的,不会被共享。
- Spring Security(11)——匿名认证
234390216
Spring SecurityROLE_ANNOYMOUS匿名
匿名认证
目录
1.1 配置
1.2 AuthenticationTrustResolver
对于匿名访问的用户,Spring Security支持为其建立一个匿名的AnonymousAuthenticat
- NODEJS项目实践0.2[ express,ajax通信...]
逐行分析JS源代码
Ajaxnodejsexpress
一、前言
通过上节学习,我们已经 ubuntu系统搭建了一个可以访问的nodejs系统,并做了nginx转发。本节原要做web端服务 及 mongodb的存取,但写着写着,web端就
- 在Struts2 的Action中怎样获取表单提交上来的多个checkbox的值
lhbthanks
javahtmlstrutscheckbox
第一种方法:获取结果String类型
在 Action 中获得的是一个 String 型数据,每一个被选中的 checkbox 的 value 被拼接在一起,每个值之间以逗号隔开(,)。
所以在 Action 中定义一个跟 checkbox 的 name 同名的属性来接收这些被选中的 checkbox 的 value 即可。
以下是实现的代码:
前台 HTML 代码:
- 003.Kafka基本概念
nweiren
hadoopkafka
Kafka基本概念:Topic、Partition、Message、Producer、Broker、Consumer。 Topic: 消息源(Message)的分类。 Partition: Topic物理上的分组,一
- Linux环境下安装JDK
roadrunners
jdklinux
1、准备工作
创建JDK的安装目录:
mkdir -p /usr/java/
下载JDK,找到适合自己系统的JDK版本进行下载:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
把JDK安装包下载到/usr/java/目录,然后进行解压:
tar -zxvf jre-7
- Linux忘记root密码的解决思路
tomcat_oracle
linux
1:使用同版本的linux启动系统,chroot到忘记密码的根分区passwd改密码 2:grub启动菜单中加入init=/bin/bash进入系统,不过这时挂载的是只读分区。根据系统的分区情况进一步判断. 3: grub启动菜单中加入 single以单用户进入系统. 4:用以上方法mount到根分区把/etc/passwd中的root密码去除 例如: ro
- 跨浏览器 HTML5 postMessage 方法以及 message 事件模拟实现
xueyou
jsonpjquery框架UIhtml5
postMessage 是 HTML5 新方法,它可以实现跨域窗口之间通讯。到目前为止,只有 IE8+, Firefox 3, Opera 9, Chrome 3和 Safari 4 支持,而本篇文章主要讲述 postMessage 方法与 message 事件跨浏览器实现。postMessage 方法 JSONP 技术不一样,前者是前端擅长跨域文档数据即时通讯,后者擅长针对跨域服务端数据通讯,p