借楼主的贴子向楼主请教一个问题: public static void main(String args[]) throws IOException{ Socket s = new Socket("localhost",8005); OutputStreamWriter out = new OutputStreamWriter(s.getOutputStream()); out.write("SHUTDOWN"); out.flush(); out.close(); s.close(); }以上代码,把一个字符串“SHUTDOWN”发到8005端口,就可以使tomcat关闭,请问怎样的命令能使Tomcat 重新载入某个站点?
http://blog.csdn.net/cm4ever/archive/2004/10/05/125201.aspx
throws IOException{
Socket s = new Socket("localhost",8005);
OutputStreamWriter out = new OutputStreamWriter(s.getOutputStream());
out.write("SHUTDOWN");
out.flush();
out.close();
s.close();
}以上代码,把一个字符串“SHUTDOWN”发到8005端口,就可以使tomcat关闭,请问怎样的命令能使Tomcat 重新载入某个站点?
http://localhost:8080/manager/html/reload?path=/要重载的站点名称&j_username=用户名&j_password=密码j_username和j_password是我读tomcat的例子时看到的,没验证过,你可以搜索一下webapps目录。
用户名和密码在Tomcat/conf/tomcat-users.xml里配置,或者改conf/server.xml为某数据库表。该用户必须拥有manager权限。