This commit is contained in:
Éibhear Ó hAnluain 2017-08-12 20:38:08 +01:00
parent d1d266096b
commit 00ebbb4f0b
1 changed files with 37 additions and 0 deletions

View File

@ -100,3 +100,40 @@
: ${DEV_HOME}/source/lib/javaBootcampNoEclipse.jar
If this is the case, move on to lesson 3:
: git checkout lesson-3
** Lesson 3 -- build the war file
*** Starting point
A clean git working area with two additional class files and one
additional jar file.
*** Goal
A deployable war file
*** Steps
0. [@0] Review the following:
- http://tomcat.apache.org/tomcat-8.0-doc/appdev/deployment.html
to understand the structure of the =war= file and the
=web.xml= file
- =${DEV_HOME}/source/res/web.xml= to understand how this
application is to be used.
1. Create an empty directory in =${DEV_HOME}= called =webapp=,
then its directory structure and then change into it:
: mkdir -vp ${DEV_HOME}/webapp
: mkdir -vp ${DEV_HOME}/webapp/WEB-INF/lib
: cd ${DEV_HOME}/webapp
2. Copy in the jsps:
: cp -rv ${DEV_HOME}/source/jsps/* ${DEV_HOME}/webapp
3. Copy in the jar file:
: cp -rv ${DEV_HOME}/source/lib/javaBootcampNoEclipse.jar ${DEV_HOME}/webapp/WEB-INF/lib
4. Copy in the =web.xml= file:
: cp -rv ${DEV_HOME}/source/res/web.xml ${DEV_HOME}/webapp/WEB-INF
5. Create the war file:
: jar cvf ${DEV_HOME}/source/lib/javaBootcampNoEclipse.war *
6. If this was successful you will now have a new file:
: ${DEV_HOME}/source/lib/javaBootcampNoEclipse.war
If this is the case, remove the direcory =${DEV_HOME}/webapp=
and move on to lesson 4:
: rm -fr ${DEV_HOME}/webapp
: git checkout lesson-4