在自动化构建时,我们常常要判断web容器有没有正常启动,如下脚本非常实用
<?xml version="1.0" encoding="GBK"?>
<project name="auto_test" basedir="." default="main">
<target name="main">
<waitfor maxwait="5" maxwaitunit="second"
timeoutproperty="project.missing">
<http url="http://10.71.110.137:8680/controlui/page/login.jsp"/>
</waitfor>
<fail if="project.missing">No project found</fail>
</target>
</project>