??xml version="1.0" encoding="utf-8" standalone="yes"?>
]]>
]]>
]]>
<html>
<body onload="window.open('http://www.pconline.com.cn','example01','fullscreen');">;
<b>www.e3i5.com</b>
</body>
</html>
2.弹启一个被F11化后的窗?/strong>
<html>
<body onload="window.open(''http://www.pconline.com.cn','example02','channelmode');">;
<b>www.e3i5.com</b>
</body>
</html>
3.弹启一个带有收藏链接工h的窗?/strong>
<html>
<body onload="window.open('http://www.pconline.com.cn','example03','width=400,height=300,directories');">
<b>www.e3i5.com</b>
</body>
</html>
4.|页对话?/strong>
<html>
<SCRIPT LANGUAGE="javascript">
<!--
showModalDialog('http://www.pconline.com.cn','example04','dialogWidth:400px;dialogHeight:300px;
dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes')
//-->
</SCRIPT>
<b>www.e3i5.com</b>
</body>
</html>
<html>
<SCRIPT LANGUAGE="javascript">
<!--
showModelessDialog('http://www.pconline.com.cn','example05','dialogWidth:400px;dialogHeight:300px;
dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes')
//-->
</SCRIPT>
<b>http://www.pconline.com.cn</b>
</body>
</html>
showModalDialog()或是showModelessDialog() 来调用网对话框Q至于showModalDialog()与showModelessDialog()的区别,在于showModalDialog()打开的窗口(U模式窗口)Q置在父H口上,必须关闭才能讉K父窗?量用Q以免招人反?QshowModelessDialog()Q简U无模式H口Q,打开后不必关闭也可访问父H口打开的窗口?
dialogHeight: iHeight 讄对话框窗口的高度?
dialogWidth: iWidth 讄对话框窗口的宽度?
dialogLeft: iXPos 讄对话框窗口相对于桌面左上角的left位置?
dialogTop: iYPos 讄对话框窗口相对于桌面左上角的top位置?
center: {yes | no | 1 | 0 } 指定是否对话框在桌面上居中Q默认值是“yes”?br />
help: {yes | no | 1 | 0 } 指定对话框窗口中是否昄上下文敏感的帮助图标。默认值是“yes”?
resizable: {yes | no | 1 | 0 } 指定是否对话框窗口大可变。默认值是“no”?
status: {yes | no | 1 | 0 } 指定对话框窗口是否显C状态栏。对于非模式对话框窗口,默认值是“yes”Q对于模式对话框H口Q默认值是 “no”?/p>
plug-in|址Q?/font>
http://www.eclipse-plugins.info/eclipse/index.jsp
http://www.eclipse-workbench.com/jsp/
http://eclipse-plugins.2y.net/eclipse/index.jsp Q非帔R常著名的插g更新|站Q?
http://www.crionics.com/products/opensource/eclipse/eclipse.jsp Q分cL楚)
http://www.eclipseplugincentral.com/
Preferences无法昄新安装的插g的解军_?/font>
删除C:\eclipse\configuration\org.eclipse.update下的platform.xml文gQ重新启动Eclipse
perl插g http://e-p-i-c.sf.net/updates
C#插g http://www.improve-technologies.com/alpha/updates/site.xml
C插g http://update.eclipse.org/tools/cdt/releases/new
Hex插g http://ehep.sourceforge.net/update
Eclipse加速插件KeepResident
http://suif.stanford.edu/pub/keepresident/
原理:利用两个 Windows API - SetProcessWorkingSetSize ?VirtualLock (适用?Windows q_)?/font>
切换时果然快很多?/font>
官方最D定在 100 MBQ最大?250 MB 左右?/font>
|
|
|
|
|
|
|
|
|
|
|
|
|
net.sf.hibernate.Criteriaq个接口代表对一个特定的持久化类的查询?TT class=literal>Session是用来制?TT class=literal>Criteria实例的工厂?
Criteria crit = sess.createCriteria(Cat.class);
crit.setMaxResults(50);
List cats = crit.list();
一个查询条?Criterion)?TT class=literal>net.sf.hibernate.expression.Criterion接口的一个实例。类net.sf.hibernate.expression.Expression定义了获得一些内|的Criterioncd?
List cats = sess.createCriteria(Cat.class)
.add( Expression.like("name", "Fritz%") )
.add( Expression.between("weight", minWeight, maxWeight) )
.list();
表达式(ExpressionsQ可以按照逻辑分组.
List cats = sess.createCriteria(Cat.class)
.add( Expression.like("name", "Fritz%") )
.add( Expression.or(
Expression.eq( "age", new Integer(0) ),
Expression.isNull("age")
) )
.list();
List cats = sess.createCriteria(Cat.class)
.add( Expression.in( "name", new String[] { "Fritz", "Izi", "Pk" } ) )
.add( Expression.disjunction()
.add( Expression.isNull("age") )
.add( Expression.eq("age", new Integer(0) ) )
.add( Expression.eq("age", new Integer(1) ) )
.add( Expression.eq("age", new Integer(2) ) )
) )
.list();
有很多预制的条gcdQ?TT class=literal>Expression的子c)。有一个特别有用,可以让你直接嵌入SQL?
List cats = sess.createCriteria(Cat.class)
.add( Expression.sql("lower($alias.name) like lower(?)", "Fritz%", Hibernate.STRING) )
.list();
其中?TT class=literal>{alias}是一个占位符Q它会被所查询实体的行别名所替代?原文:The {alias} placeholder with be replaced by the row alias of the queried entity.)
可以使用net.sf.hibernate.expression.Order对结果集排序.
List cats = sess.createCriteria(Cat.class)
.add( Expression.like("name", "F%")
.addOrder( Order.asc("name") )
.addOrder( Order.desc("age") )
.setMaxResults(50)
.list();
你可以在兌之间使用createCriteria()Q很Ҏ地在存在关系的实体之间指定约束?
List cats = sess.createCriteria(Cat.class)
.add( Expression.like("name", "F%")
.createCriteria("kittens")
.add( Expression.like("name", "F%")
.list();
注意Q第二个createCriteria()q回一?TT class=literal>Criteria的新实例Q指?TT class=literal>kittens集合cȝ元素?
下面的替代Ş式在特定情况下有用?
List cats = sess.createCriteria(Cat.class)
.createAlias("kittens", "kt")
.createAlias("mate", "mt")
.add( Expression.eqProperty("kt.name", "mt.name") )
.list();
Q?TT class=literal>createAlias()Qƈ不会创徏一?TT class=literal>Criteria的新实例。)
h意,前面两个查询?TT class=literal>Cat实例所持有的kittens集合c?SPAN class=emphasis>q没?/EM>通过criteria预先qoQ如果你希望只返回满x件的kittens,你必M?TT class=literal>returnMaps()?
List cats = sess.createCriteria(Cat.class)
.createCriteria("kittens", "kt")
.add( Expression.eq("name", "F%") )
.returnMaps()
.list();
Iterator iter = cats.iterator();
while ( iter.hasNext() ) {
Map map = (Map) iter.next();
Cat cat = (Cat) map.get(Criteria.ROOT_ALIAS);
Cat kitten = (Cat) map.get("kt");
}
可以在运行时通过setFetchMode()来改变关联对象自动获取的{略?
List cats = sess.createCriteria(Cat.class)
.add( Expression.like("name", "Fritz%") )
.setFetchMode("mate", FetchMode.EAGER)
.setFetchMode("kittens", FetchMode.EAGER)
.list();
q个查询会通过外连?outer join)同时获得 mate?TT class=literal>kittens?
net.sf.hibernate.expression.Examplecd怽从指定的实例创造查询条件?
Cat cat = new Cat();
cat.setSex('F');
cat.setColor(Color.BLACK);
List results = session.createCriteria(Cat.class)
.add( Example.create(cat) )
.list();
版本属性,表示W属性和兌都会被忽略。默认情况下Qnull值的属性也被排除在外?
You can adjust how the Example is applied. 你可以调?TT class=literal>CZ(Example)如何应用?
Example example = Example.create(cat)
.excludeZeroes() //exclude zero valued properties
.excludeProperty("color") //exclude the property named "color"
.ignoreCase() //perform case insensitive string comparisons
.enableLike(); //use like for string comparisons
List results = session.createCriteria(Cat.class)
.add(example)
.list();
你甚臛_以用CZ对关联对象徏立criteria?
List results = session.createCriteria(Cat.class)
.add( Example.create(cat) )
.createCriteria("mate")
.add( Example.create( cat.getMate() ) )
.list();
代码下蝲Q?/FONT>
http://www.tkk7.com/Files/limq/hibernate_demo.rar<body>
h服务器:
<%= request.getServerName() %><br>
使用协议Q?BR><%= request.getProtocol() %><br>
hҎQ?BR><%= request.getMethod() %><br>
h断口P
<%= request.getServerPort() %><br>
Context路径Q?BR><%= request.getContextPath() %><br>
Servlet路径Q?BR><%= request.getServletPath() %><br>
URI路径Q?BR><%= request.getRequestURI() %><br>
查询字串Q?BR><%= request.getQueryString() %><br>
<br>
使用者主IPQ?BR><%= request.getRemoteAddr() %><br>
<%= request.getRemotePort() %>
</body>
</html>
再用一下方式测?
http://localhost:8080/WebModule1/path.jsp?name=justin&nick=caterpillar
l果?
h服务器: localhost
使用协议Q?HTTP/1.1
hҎQ?GET
h断口P 8080
Context路径Q?/WebModule1
Servlet路径Q?/path.jsp
URI路径Q?/WebModule1/path.jsp
查询字串Q?name=justin&nick=caterpillar
使用者主?CIPQ?127.0.0.1
1490
具体Ҏ请参?/SPAN> 上一文?/SPAN>JBuilder2005 ?/SPAN> jsp2.0 初体?/SPAN>,本文主要讲的?/SPAN>jb2005下自定义标签的开?/SPAN>.
Z能够快速开?/SPAN>,我用了open source ?/SPAN>JSP Tag Wizards v3.0插g,它可以帮助我们快速开?/SPAN>jsp1.1,?/SPAN>jsp2.0的各U标{?/SPAN>.下蝲地址?/SPAN> : http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=21573. 下载来的压~包解压?/SPAN>JBuilder/lib/ext中就可以?/SPAN>.
新徏一?/SPAN>Mytag2的工E?/SPAN>,q里要将我们上一节说?/SPAN>jsp2.0以及JSTL1.1的包dq去.
新徏一?/SPAN>web模块
建立jsp 标签文g,双击 JPS Tag
׃我们q里使用的是SimpleTagSupport 所以勾?/SPAN> Simple tag, 点击 OK
可以看到JSP Tag Wizards v3.0已经自动为我们生成了Hello.java文g.
q里我将dotag()Ҏ 改ؓ
public void doTag() throws IOException, JspException {
JspWriter out = getJspContext().getOut();
/** @todo specify any output value for this tag */
out.print("Hello JSp2.0 tag");
}
然后建立 tld 文g. 如图选择Taglib Descriptor
接下来我们可以选择要生?/SPAN>tld 文g ?/SPAN> 位置,和名U?/SPAN>, q里我没有改变其默认?/SPAN>.
一直点?/SPAN> Next > 直到
q里我们可以选择标签体内容ؓ Empty. Finish .
可以看到JSP Tag Wizards v3.0 为我们生成了Mytag2.tld文g,以及相关配置.接下来我们需要将它{Ud Web-Inf/tld ?/SPAN>, 叛_WEB-INF>New>Directory
点击 ok.
在将刚才生成?/SPAN> Mytag2.tld文gUd臛_?/SPAN>.
新徏一?/SPAN>jsp文g.
<%@ page contentType="text/html; charset=GB18030" %>
<%@ taglib uri="/WEB-INF/tld/Mytag2.tld" prefix="mytag"%>
jsp1
好了大功告成?/SPAN>,让我们来看看执行l果?/SPAN>
JBuilder2005 比较前一个版本提供了jsp2.0,以及servlet2.4的支?/SPAN>,|于jsp2.0规范q里׃多说?/SPAN>,以下介绍?/SPAN>jb2005中的体会.
一 安装讄Tomcat5.0
我们知道,Jsp2.0?/SPAN>Tomcat5.0以上的版本所支持?/SPAN>,所以如果你使用的是jbuilder默认?/SPAN>tomcat4.0?/SPAN>WEB模块是看不到jsp2.0,以及servlet2.4?/SPAN>,所以要首先安装讄Tomcat5.0以上的版?/SPAN>,然后?/SPAN>Jbuilder中设|如?/SPAN>
?/SPAN> ?/SPAN> http://jakarta.apache.org下蝲 jakarta-taglibs-standard-current.jar是JSTL1.1的包,(jb中也可以,但是L提示有文件找不到,所以我׃了一个新?/SPAN>,问题解决?/SPAN>),解压后?/SPAN>jstl.jar, standard.jar复制?/SPAN>JBuilder2005\lib?/SPAN>,配置如下
然后讄jsp-api.jar,我的路径?/SPAN>C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib
?/SPAN> 新徏立一个程?/SPAN>
File>New Project> name?/SPAN>jsp2 Next>?/SPAN> Require Libraries 中将我们刚才d?/SPAN>jsp2.0?/SPAN>JTSL1.1选上.>Finish
File>new>Web> WebModule q里 要记得选择 servlet2.4,jsp2.0 ,name ?/SPAN> jsp2 Next>选择JTSL1.1(JTSL1.0)选项.> Finish
?/SPAN> 刚才下载的jakarta-taglibs-standard-current.jar中的tld文g夹复制到WEB-INF?
?/SPAN> 修改web.xml
?/SPAN> 建立一?/SPAN>html 文gҎ是右?/SPAN>Moudule directory>New>File>Name=Param,Type=Html
代码?/SPAN>:
EL
隐含对象 param?/SPAN>paramValues
姓名Q?/SPAN>
密码Q?/SPAN>
性别Q?/SPAN>?/SPAN>
?/SPAN>
q龄Q?/SPAN>
兴趣Q?/SPAN>看书
玩游?/SPAN>
旅游
听音?/SPAN>
看电?/SPAN>
传?/SPAN>"/> 清除"/>
?/SPAN> 新徏一?/SPAN>jsp文g
File>New>Web>JSP >(Name=Param)>Next>N?/SPAN>JSTL1.1(JSTL1.0)>Finish
代码如下:
<%@ page contentType="text/html; charset=GB2312" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
EL
隐含对象 param?/SPAN>paramValues
姓名Q?/SPAN>
密码Q?/SPAN>
性别Q?/SPAN>
q龄Q?/SPAN>
兴趣Q?/SPAN>
վ֩ģ壺 AƬ߹ۿ| 337pձŷ| ĻƵ| ٸ| һƬѿ| ղһ| ĻѸ| պvavaŷva| ƷƵ| þƷƷ| һѹۿ| Ʒþ| AVַ߹ۿ| mm1313ƷԿ| avһ| wwwƵ߹ۿ| þƷĻ| þþþþþ99Ʒ| Ʒר| պaëƬƵ| jizz18Ƶ| һ| պƵ| վ| þþƷAV鶹վ| 99߾Ʒѹۿ| ƷһëƬ| ɫĻAV| 99ƵȫѾƷȫĻ| ˳վ߹ۿ| ˳Ƶx8x8| Ƶ߹ۿ| þþƷAVũ帾Ů | ѻɫӰ߹ۿ| 91˾þþƷ| Ļ˾Ʒ | պ伤Ƶ߲ | ߹ۿAVվ| Ʒ91| ۺϼƵ| ƷƵ|
建立好后应ؓ
执行l果: