用sun的ftp包连接IBM aix服务器抛如下错误:
501 port not allow after EPSV ALL, active mode off
原因:
ftp要改为被动passtive模式.
解决方法:
使用第三方包edtftpj-1.5.1.jar连接服务器,在连接前设置模式为passtive
Demo
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
package app4;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
import com.enterprisedt.net.ftp.FTPClient;
import com.enterprisedt.net.ftp.FTPMessageCollector;
import com.enterprisedt.net.ftp.FTPTransferType;
import com.enterprisedt.net.ftp.FTPConnectMode;
import com.enterprisedt.util.debug.Level;
import com.enterprisedt.util.debug.Logger;
import java.util.Date;
import java.io.File;
public class Demo {
/**
* Log stream
*/
private static Logger log = Logger.getLogger(Demo.class);
public static void main(String[] args) {
// we want remote host, user name and password
// if (args.length < 3) {
// usage();
// System.exit(1);
// }
// assign args to make it clear
String host = "localhost";//args[0];
String user = "lijun2";//args[1];
String password = "836301";//args[2];
Logger.setLevel(Level.ALL);
FTPClient ftp = null;
try {
// set up client
log.info("Connecting");
// get directory and print it to console
log.debug("Directory before put:");
String[] files =
ftp.dir(".", true);
for (int i = 0; i < files.length; i++)
log.debug(files[i]);
// copy file to server
System.out.println(new Date());
log.info("Putting file");
File loadfile = new File("a.ISO");
ftp.put("a.ISO", "a.ISO");
System.out.println(new Date());
// get directory and print it to console
log.debug("Directory after put");
files =
ftp.dir(".", true);
for (int i = 0; i < files.length; i++)
log.debug(files[i]);
// copy file from server
// log.info("Getting file");
//
ftp.get("2005.doc" + ".copy", "2005.doc");
// get directory and print it to console
// log.debug("Directory after delete");
files =
ftp.dir("", true);
for (int i = 0; i < files.length; i++)
log.debug(files[i]);
// Shut down client
log.info("Quitting client");
ftp.quit();
String messages = listener.getLog();
log.debug("Listener log:");
log.debug(messages);
log.info("Test complete");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void usage() {
System.out.println("Usage: Demo remotehost user password");
}
}
Bug描述: SELECT elements ignore Z-index ("windowed element" problem)
连接:http://www.throbs.net/web/articles/IE-SELECT-bugs/#ieZIndex
问题原因:
1. select html标记在IE6下的解析不管Z-index
2. div 不能遮盖select,
解决思路:
1. 在select上用iframe遮盖
2. 在iframe上用div遮盖
3. iframe的width,height,top,left与div一样大.
示例代码
#zindexDiv{
position:absolute;
z-index:50;
width:expression(this.nextSibling.offsetWidth);
height:expression(this.nextSibling.offsetHeight);
top:expression(this.nextSibling.offsetTop);
left:expression(this.nextSibling.offsetLeft);
/*background-color:green;?ff????????,????????????????*/
}
#divUp{
z-index:99;
position:absolute;
background-color:red;
width:100;
height:18;
overflow:hidden;
height:60px;
}
#ddlTest{
width:200;
z-index:1;
}
</style>
<body>
<iframe id="zindexDiv" frameborder="0"></iframe>
<div id="divUp">aaaaaaa<br>bbbbbbb<br>ccccccc</div>