首页 技术教程 实用代码 注册破解 正则表达式 网址导航 电子书籍

Java使用ANT在线编译不用重启tomcat的实现方法

在WEB应用中可通过ANT的API调用ant的工程配置文件来在线编译java文件,在工程配置文件中(如build.xml)将编译的class文件或者变更的xml文件直接复制到WEB-INF\classes中的对应目录,不用重新启动tomcat. 由于在平台应用中经常由用户定义表结构,并由表结构生成java实体类和hibernate映射文件,通过热编译部署的方式 可不用停止WEB应用,下面是在Java中调用ant的代码,注意这种方式不是调用ant的批处理的,也不提倡这样做,下面的方式可使用户通过点击WEB页面上的按钮来调用ANT编译: package org.apache.easframework.common; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStre...
类别:网页编程 - JSP技术    查看:138    更新:2014-06-28

important终级讲解

很多人,包括很多网站(我所见过的所有网站,包括国内著名的‘网页设计师’网站),都说important是不被IE所支持和认识的,可是真的是这样吗?看了下边的两个例子,也许你会改变一些看法! 例一: <style> #box { color:red !important; color:blue; } </style>    <div id="Box"> 在不同的浏览器下,这行字的色应该不同!</div>   这个例子应该是大家经常见到的important的用法了,在IE环境下,这行字是蓝色,在firefox下,为红色,其用法不再多说了,看下一个例子。 例二: <style> #box div...
类别:网页编程 - CSS技术    查看:204    更新:2014-06-10

jQuery选择器->层级->ancestor descendant

ancestor descendant    返回值:Array<Element(s)> 概述 在给定的祖先元素下匹配所有的后代元素   参数 ancestorSelector 任何有效选择器 descendantSelector 用以匹配元素的选择器,并且它是第一个选择器的后代元素 示例 描述: 找到表单中所有的 input 元素 HTML 代码: <form> <label>Name:</label> <input name="name" /> <fieldset> <label>Newsletter:</label> <input name="newsletter" /> </fieldset> </form> <input name="none" />...
类别:网页编程 - JavaScript    查看:117    更新:2014-05-26

Prototype实战教程:Element.Methods -> immediateDescendants

immediateDescendants     [deprecated] immediateDescendants(element) -> [HTMLElement...] 获取元素的直接后代(即子元素),返回一个数组,数组中的元素已经过 扩展。 在 Prototype 1.6 中,不推荐使用 Element#immediateDescendants,建议采用更友好的 Element#childElements 方法。   返回的数组成员按照元素在页面中的顺序进行排列(例如:索引 0 表示最顶部的子元素)。   注意:所有 Prototype 的 DOM 扩展方法均忽略文本节点,仅返回元素节点。 样例 <div id="australopithecus"> <div id="homo-erectus"> <div id=&qu...
类别:网页编程 - JavaScript    查看:118    更新:2014-05-22

Prototype实战教程:Element.Methods -> firstDescendant

firstDescendant   [1.5.1] firstDescendant(element) -> HTMLElement 返回第一个子元素。与 DOM 属性 firstChild 不同,firstChild 返回任意类型的节点(在很多情形下, 经常是一个空白文本节点[译注:这种情况在 Firefox 中较为常见])。 样例 <div id="australopithecus"> <div id="homo-erectus"><!--Latin is super --> <div id="homo-neanderthalensis"></div> <div id="homo-sapiens"></div> </div> </div> $('australopithecus').firstDescendant(); // -> div#homo-herec...
类别:网页编程 - JavaScript    查看:131    更新:2014-05-22

Prototype实战教程:Element.Methods -> descendants

descendants descendants(element) -> [HTMLElement...] 返回 element 的所有后代节点,结果为一个数组,数组元素已经过 扩展。 注意:所有 Prototype 的 DOM 扩展方法均忽略文本节点,仅返回元素节点。 样例 <div id="australopithecus"> <div id="homo-herectus"> <div id="homo-neanderthalensis"></div> <div id="homo-sapiens"></div> </div> </div> $('australopithecus').descendants(); // -> [div#homo-herectus, div#homo-neanderthalensis, div#homo-sapiens] $('homo-sapiens').descendants();...
类别:网页编程 - JavaScript    查看:120    更新:2014-05-22

Prototype实战教程:Element.Methods -> descendantOf

descendantOf descendantOf(element, ancestor) -> Boolean 判断 element 是否是参数 ancestor 指定元素的后代节点。 因为 Element.descendantOf 内部对 ancestor 应用了 $(),所以参数 ancestor 既可以是元素,也可以是元素的 ID。 样例 <div id="australopithecus"> <div id="homo-herectus"> <div id="homo-sapiens"></div> </div> </div> $('homo-sapiens').descendantOf('australopithecus'); // -> true $('homo-herectus').descendantOf('homo-sapiens'); // -> false ...
类别:网页编程 - JavaScript    查看:110    更新:2014-05-22

Prototype实战教程:Element -> immediateDescendants

immediateDescendants(element) -> [HTMLElement...] 获取元素的直接后代(即子元素),返回一个数组,数组中的元素已经过 扩展。 在 Prototype 1.6 中,不推荐使用 Element#immediateDescendants,建议采用更友好的 Element#childElements 方法。   返回的数组成员按照元素在页面中的顺序进行排列(例如:索引 0 表示最顶部的子元素)。   注意:所有 Prototype 的 DOM 扩展方法均忽略文本节点,仅返回元素节点。 样例 <div id="australopithecus"> <div id="homo-erectus"> <div id="homo-neanderthalensis"></div> <div id="ho...
类别:网页编程 - JavaScript    查看:132    更新:2014-05-22

Prototype实战教程:Element -> firstDescendant

firstDescendant(element) -> HTMLElement 返回第一个子元素。与 DOM 属性 firstChild 不同,firstChild 返回任意类型的节点(在很多情形下, 经常是一个空白文本节点[译注:这种情况在 Firefox 中较为常见])。 样例 <div id="australopithecus"> <div id="homo-erectus"><!--Latin is super --> <div id="homo-neanderthalensis"></div> <div id="homo-sapiens"></div> </div> </div> $('australopithecus').firstDescendant(); // -> div#homo-herectus // DOM 的 firstChild 属性返回任意类型的...
类别:网页编程 - JavaScript    查看:123    更新:2014-05-22

Prototype实战教程:Element -> descendants

descendants(element) -> [HTMLElement...] 返回 element 的所有后代节点,结果为一个数组,数组元素已经过扩展。 注意:所有 Prototype 的 DOM 扩展方法均忽略文本节点,仅返回元素节点。 样例 <div id="australopithecus"> <div id="homo-herectus"> <div id="homo-neanderthalensis"></div> <div id="homo-sapiens"></div> </div> </div> $('australopithecus').descendants(); // -> [div#homo-herectus, div#homo-neanderthalensis, div#homo-sapiens] $('homo-sapiens').descendants(); // -> [] ...
类别:网页编程 - JavaScript    查看:105    更新:2014-05-22

Prototype实战教程:Element -> descendantOf

descendantOf(element, ancestor) -> Boolean 判断 element 是否是参数 ancestor 指定元素的后代节点。 因为 Element.descendantOf 内部对 ancestor 应用了 $(),所以参数 ancestor 既可以是元素,也可以是元素的 ID。 样例 <div id="australopithecus"> <div id="homo-herectus"> <div id="homo-sapiens"></div> </div> </div> $('homo-sapiens').descendantOf('australopithecus'); // -> true $('homo-herectus').descendantOf('homo-sapiens'); // -> false ...
类别:网页编程 - JavaScript    查看:124    更新:2014-05-22

Java使用ANT在线编译不用重启tomcat的实现方法

在WEB应用中可通过ANT的API调用ant的工程配置文件来在线编译java文件,在工程配置文件中(如build.xml)将编译的class文件或者变更的xml文件直接复制到WEB-INFclasses中的对应目录,不用重新启动tomcat.         由于在平台应用中经常由用户定义表结构,并由表结构生成java实体类和hibernate映射文件,通过热编译部署的方式 可不用停止WEB应用,下面是在Java中调用ant的代码,注意这种方式不是调用ant的批处理的,也不提倡这样做,下面的方式可使用户通过点击WEB页面上的按钮来调用ANT编译: package org.apache.easframework.common; import java.io.File; import&n...
类别:网页编程 - JSP技术    查看:128    更新:2014-05-20