Wednesday, November 10, 2010

deploy (war) into apache tomcat 6.0 at linux

i'm using apache-tomcat-6.0.26 that comes with netbeans 6.9 installation bundle .  You can run tomcat outside netbeans. When deploy, don't confuse with manager list apache tomcat server service inside netbeans.

To deploy into tomcat, just copy your war to :

/usr/local/apache-tomcat-6.0.26/webapps

or, you can use apache ant script, this's snippet script code at build.xml file for deploy to webapps folder :

<target name="deploy" depends="war">
        <echo message=" deploying ${war.dir}/${warfile} to ${deploy.dir}"/>
        <copy file="${war.dir}/${warfile}" todir="${deploy.dir}" overwrite="true"/>
    </target>

if you use manager list, don't forget to add manager role at :

/usr/local/apache-tomcat-6.0.26/conf/tomcat-users.xml


Set CLASSPATH bash shell via .bashrc conf file

type this on terminal (bash shell) :

sudo gedit ~/.bashrc

Append that conf file look like this line, modified the path to suit your environment :

export JASPER_HOME=/media/D/libs/JasperReport;
export CLASSPATH=$CLASSPATH:$JASPER_HOME/jasperreports-3.7.6/dist:$JASPER_HOME/jasperreports-3.7.6/lib;
test with :

echo $CLASSPATH

everytime you start your terminal, your classpath automatically setted.

gcc compile c++ glut at linux

gcc -I/usr/X11R6/include -L/usr/local/lib -lglut -lGL -lGLU -o Kubus1 Kubus.cpp