blob: c7d72fb8a26335fe5a280d054475458a5b4f3c4d [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>6.2&nbsp;Form Tags WAR</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Virgo Programmer Guide"><link rel="up" href="ch06.html" title="6.&nbsp;Case Study: Migrating the Form Tags Sample Application"><link rel="prev" href="ch06.html" title="6.&nbsp;Case Study: Migrating the Form Tags Sample Application"><link rel="next" href="ch06s03.html" title="6.3&nbsp;Form Tags Shared Libraries WAR"><!--Begin Google Analytics code--><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2728886-3");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.2&nbsp;Form Tags WAR</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06.html">Prev</a>&nbsp;</td><th width="60%" align="center">6.&nbsp;Case Study: Migrating the Form Tags Sample Application</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch06s03.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="formtags-case-study-war"></a>6.2&nbsp;Form Tags WAR</h2></div></div></div><p>
We begin with a standard WAR deployment.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.gif"></td><th align="left">Note</th></tr><tr><td align="left" valign="top">
The VTS supports the standard Java EE WAR
packaging
and deployment format as a first-class citizen, and there
are many
benefits to deploying a standard WAR file on the
VTS including,
but not limited to: tooling
support, runtime error diagnostics, FFDC
(first failure data
capture), etc.
In addition, support for standard WAR deployment
provides an easy on-ramp
for trying out the
VTS with existing web applications.
</td></tr></table></div><p>
</p><p>
The following screen shot displays the directory structure of the
Form Tags application using the standard WAR format. As you can see,
there is no deviation from the standard structure and layout, and as
you would expect, all of the web application&#8217;s third-party
dependencies
(for example: Spring, Commons Logging) are packaged as
JARs in
<code class="literal">WEB-INF/lib</code>
.
</p><p>
<img src="images/formtags-case-study-exploded-war.png">
</p><p>
To deploy this application, simply copy
<code class="literal">dist/formtags-war-3.0.0.*.war</code>
to
the
<code class="literal">SERVER_HOME/pickup</code>
directory for hot deployment.
</p><p>
You should then see the VTS produce
console output similar to the following:
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.gif"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>The console output has been reformatted to fit this document.
</p></td></tr></table></div><pre class="programlisting">
[2009-07-01 14:54:45.135] fs-watcher
&lt;SPDE0048I&gt; Processing 'CREATED' event for file 'formtags-war-3.0.0.RELEASE.war'.
[2009-07-01 14:54:45.797] fs-watcher
&lt;SPDE0010I&gt; Deployment of 'formtags-war-3.0.0.RELEASE.war' version '0' completed.
[2009-07-01 14:54:45.797] Thread-20
&lt;SPWE0000I&gt; Starting web bundle '/formtags-war-3.0.0.RELEASE'.
[2009-07-01 14:54:46.380] Thread-20
&lt;SPWE0001I&gt; Started web bundle '/formtags-war-3.0.0.RELEASE'.
</pre><p>
Navigate to
<code class="literal">http://localhost:8080/</code>
plus the web application context path,
which in the above case is
<code class="literal">formtags-war-3.0.0.RELEASE</code>
. Thus navigating to
<code class="literal">http://localhost:8080/formtags-war-3.0.0.RELEASE</code>
should render the sample application&#8217;s welcome page, as
displayed in the screen
shot below.
</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.gif"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top">
For WARs, the default web context path is the name of the WAR file
without the
<code class="literal">.war</code>
extension. You can optionally
specify a context path using the
<code class="literal">Web-ContextPath</code>
bundle
manifest header, which will be described in further detail
later.
</td></tr></table></div><p>
</p><p>
<img src="images/formtags-case-study-war-webpage.png">
</p></div><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript">
_lf_cid = "LF_48be82fa";
_lf_remora();
</script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch06.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch06s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.&nbsp;Case Study: Migrating the Form Tags Sample Application&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;6.3&nbsp;Form Tags Shared Libraries WAR</td></tr></table></div></body></html>