blob: e9e81cd350e5e9f76f9a355c7ef34851cc727405 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>6.&nbsp;Case Study: Migrating the Form Tags Sample Application</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="index.html" title="Virgo Programmer Guide"><link rel="prev" href="ch05s02.html" title="5.2&nbsp;Migrating to a Plan or a PAR"><link rel="next" href="ch06s02.html" title="6.2&nbsp;Form Tags 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.&nbsp;Case Study: Migrating the Form Tags Sample Application</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch05s02.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch06s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="formtags-case-study"></a>6.&nbsp;Case Study: Migrating the Form Tags Sample Application</h2></div></div></div><p>
In this chapter we will walk through the steps needed to migrate the
Form Tags sample application from a standard Java EE WAR to a fully
OSGi
compliant
<span class="emphasis"><em>Shared Services WAR</em></span>
within a PAR.
The migration involves four packaging and deployment
formats:
</p><div class="orderedlist"><ol type="1"><li><p>
<a class="link" href="ch06s02.html" title="6.2&nbsp;Form Tags WAR">Standard WAR</a>
</p></li><li><p>
<a class="link" href="ch06s03.html" title="6.3&nbsp;Form Tags Shared Libraries WAR">Shared Libraries WAR</a>
</p></li><li><p>
<a class="link" href="ch06s04.html" title="6.4&nbsp;Form Tags Shared Services WAR">Shared Services WAR</a>
</p></li><li><p>
<a class="link" href="ch06s05.html" title="6.5&nbsp;Form Tags PAR">PAR with a shared services WAR</a>
</p></li></ol></div><p>
</p><p>
Each of these migration steps will produce a web application
that
can be deployed and run on the VTS.
</p><p>
After summarising the process, an example
<code class="literal">plan</code>
is shown which is another way of
packaging and deploying the application.
</p><p>
The following image displays the directory structure you should have
after installing the Form Tags sample. Note however that the release
tag
will typically resemble
<code class="literal">3.0.0.RELEASE</code>
.
</p><p>
<img src="images/formtags-case-study-sample-layout.png">
</p><p>
The
<code class="literal">dist</code>
directory contains the distributables,
and the
<code class="literal">projects</code>
directory contains the source code
and build scripts.
</p><p>
For simplicity, this chapter will focus on the distributables&#8212;which
are built using Virgo-Build
rather than on configuring a project in an
IDE.
</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">
Pre-packaged distributables are made available in the
<code class="literal">dist</code>
directory;
however, if you would like to modify the samples or build
them from scratch, you may
do so using Virgo-Build. Take a look at
the
<code class="literal">README.TXT</code>
file in each of the folders under
the
<code class="literal">projects</code>
directory in the
Form Tags sample for instructions.
</td></tr></table></div><p>
</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="formtags-case-study-introduction"></a>6.1&nbsp;Overview of the Form Tags Sample Application</h2></div></div></div><p>
The sample that we will be using is the Form Tags show case
sample
which was provided with Spring 2.0. The Form Tags application
has
been removed from the official Spring 2.5.x distributions;
however,
since it is relatively simple but still contains enough
ingredients
to demonstrate the various considerations required during
a migration,
we have chosen to use it for these examples.
</p><p>
The purpose of the Form Tags show case sample was to demonstrate how
the Spring specific
<code class="literal">form:</code>
tags, released
in Spring 2.0, make view development with JSPs and tag
libraries easier.
The Form Tags application consists of a single
<code class="literal">UserService</code>
which returns a list
of
<code class="literal">Users</code>
. Furthermore, the application demonstrates how to list, view,
and
edit
<code class="literal">Users</code>
in a simple Spring MVC based web application using JSP
and JSTL.
</p></div></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="ch05s02.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch06s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">5.2&nbsp;Migrating to a Plan or a PAR&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.2&nbsp;Form Tags WAR</td></tr></table></div></body></html>