If you are developing locally in NetBeans, then you are using a Web Project.
This is an abstraction of a web application. The Tomcat server on
ocelot
needs the files to be placed in a standard web application.
Copying the files individually from the Web Project to the web application
is tedious and error prone. This process is automated in NetBeans.
Files
tab in NetBeans.
Properties
and select
Packaging Project
option, and remove the filter for
**/java.*
. This step only needs to be done once per project.Build
menu, select Clean and Build Main Project
.
dist
folder in the Files
tab. You should
see the war file for your project.In order to deploy a web application to ocelot, upload the WAR file to the cgs4854 directory. Do not upload directly to the webapps folder.
There are two choices for unzipping the WAR file.
ls cgs4854
unzip -o cgs4854/MyApp.war -d cgs4854/webapps/MyApp
unzip -o MyApp.war -d webapps/MyApp
After unzipping the WAR file, Tomcat will automatically deploy it. You may access it from your
student host as
http://studentXX.cgs4854.cs.fiu.edu:8008/MyApp/
If you are using WinSCP, then you can store a custom command that can be used to unzip any WAR file.
unzip -o "!" -d webapps/`ls "!" | awk -F '.' '{print $1}'`