Posted in Java, Linux on Feb 6th, 2007 No Comments »
In one project when I was writing procedure for FTP-uploading I faced a very restrictive FTP proxy. All attempts to use standard libraries from apache did not succeed. Itried to connect with FAR manager and failed as well. Sysadmin confirmed that that none of ftp clients will work non-unanimously through FTP. So the only option [...]
Posted in Linux, Tomcat on Feb 6th, 2007 No Comments »
Not big deal but I am bit tired to google for this script each time I setup new box. Now I know where to get it without spending two valuable extra minutes to google. First create /etc/rc.d/init.d/tomcatd :
PLAIN TEXT
CODE:
#!/bin/bash
#
# Startup script for Tomcat
#
# chkconfig: 345 84 16
# description: Tomcat jakarta JSP server
TOMCAT_HOME=/opt/tomcat
TOMCAT_START=$TOMCAT_HOME/bin/startup.sh
TOMCAT_STOP=$TOMCAT_HOME/bin/shutdown.sh
#Necessary environment variables
export JAVA_HOME=/opt/jdk1.5.0_10
export [...]
Posted in Linux, Tomcat on Feb 6th, 2007 1 Comment »
Here is just short script that restarts tomcat when it wrizes. It happens to our prod during peak load. You need to place inder webapps/ROOT directory a file isalive.html with one word 'YES' inside. Or alternatively modify a script and access default index.jsp.
PLAIN TEXT
CODE:
#!/bin/sh
HOST=127.0.0.1
PORT=8080
#infinite loop
while [ 1 ]
do
#try to access tomcat's page
[...]