<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-34849561</id><updated>2026-05-27T05:06:21.739-07:00</updated><title type='text'>My IT world</title><subtitle type='html'>There is no spoon.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default?start-index=26&amp;max-results=25'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>68</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34849561.post-2904244583576718697</id><published>2012-04-23T03:13:00.000-07:00</published><updated>2012-04-23T03:13:09.536-07:00</updated><title type='text'>Distributed Transactions Failure Simulation</title><content type='html'>If you have many resources which are needed to be updated as one atomic operation, probably you are using XA transactions. For example, you need to change data in database and send notification about this change to external system. Important point to note - db change and notification doesn&#39;t make sense in case one of them fails for some reason. Everything could fail, we leaving in not ideal world. The question is how to test the worst case - resource failure and be sure that system is in predictable state before and after transaction. There are could be different approaches for this, but in this blog entry I&#39;m going to describe approach I found really interesting. As for me it&#39;s one of the best approaches to ensure that transactions in application are really bullet proof.

I&#39;m talking here about &quot;failure injection&quot;. &quot;Injection&quot; means that you can declaratively enforce some method to throw exception, without changing any code from service layer. It&#39;s really close to simulating real failure. All this possible with JBoss Bytemann (http://www.jboss.org/byteman). This Java agent can do much more, but it&#39;s out of scope of this post.

They have support for jUnit, a special annotation which will enforce method you&#39;ll name to throw an exception. In my case I&#39;ve played with db and jms XA transaction with Atomikos as transaction manager. As for me its good playground - H2 in-memory database and Apache ActiveMQ embedded in-memory broker. Friendly speaking I&#39;m not fan of jms mocks, why do we need them if there is fully functional real JMS broker, just in memory. You even don&#39;t need to start and stop it manually. Let&#39;s take mockrunner (http://mockrunner.sourceforge.net/examplesjms.html)-
&lt;br /&gt;
&lt;blockquote&gt;
A few notes on the JMS implementation:
    The JMS test module is not a full blown message server, but it supports all necessary functionality to test JMS code. The implementation breaks the JMS specification in some cases. Messages are immediately forwarded to a proper receiver, if possible. Otherwise they&#39;re stored for later examination. There&#39;s no real transaction support, i.e. the framework keeps track if a transaction is committed or rolled back, but does not guarantee transaction atomicity. If you send a message in a transaction, it will be forwarded to the receiver, even if you rollback the transaction.&lt;/blockquote&gt;
As you can see some special tricks are required in case of mockrunner, since it haven&#39;t atomicity guarantees.

I should say that there are some tricky parts in Bytemann and Spring integration. Both of them are using @RunWith annotation for their internal infrastructure setup. Pity thing is that you can&#39;t use multiply @RunWith declarations in jUnit. So, we need to have both - @RunWith(BMUnitRunner.class) and @RunWith(SpringJUnit4ClassRunner.class)... oops. Not all so bad. It&#39;s possible to eliminate SpringJUnit4ClassRunner usage. Yep, it&#39;s not universal solution for multiply jUnit runners, but it&#39;s working in this case. To do the same as Spring class runner you can say this:

&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff; color: black;&quot;&gt;@Before
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; void setUpContext() &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;throws&lt;/span&gt; Exception &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;testContextManager &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;new&lt;/span&gt; TestContextManager&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;getClass&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;testContextManager&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;prepareTestInstance&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
From docs -

&lt;br /&gt;
&lt;blockquote&gt;
TestContextManager is the main entry point into the Spring TestContext Framework, which provides support for loading and accessing  ApplicationContext application contexts, dependency, injection of test instances, transactional execution of test methods, etc.
&lt;/blockquote&gt;
So, final test looks like this:

&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff; color: black;&quot;&gt;@Test(expected = Exception.class)
@Transactional
@BMRule(name=&quot;Database goes down&quot;,
isInterface = true,
targetClass = &quot;com.blogspot.ostas.lora.database.IUserDao&quot;,
targetMethod = &quot;save&quot;,
action = &quot;org.apache.log4j.Logger.getLogger(getClass())
.debug(\&quot;DB failure simulation\&quot;)&lt;span style=&quot;color: #808030;&quot;&gt;;&lt;/span&gt;
throw new java.lang.RuntimeException(\&quot;Simulated Database Failure\&quot;)&quot;)
&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; void save()&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
   userService&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;saveAndNotify&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;user&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;try&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            LOGGER&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;info&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;Transaction status : &quot;&lt;/span&gt;
            &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;jtaTransactionManager&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;getTransactionManager&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;getStatus&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;catch&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;SystemException e&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            LOGGER&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;error&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;e&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
Here I&#39;m enforcing DAO component of my service layer to throw runtime exception - it&#39;s simulated resource failure. Also, after this I&#39;m checking db state using JDBC to be 100% sure that noting went wrong in case of JMS failure. As you can see, there is no changes in service layer code, no mocks, etc.

Thanks for reading. Complete source code of my pet project you can find here:

&lt;a href=&quot;https://github.com/daoway/AtomikosSandbox&quot;&gt;https://github.com/daoway/AtomikosSandbox&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2904244583576718697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/2904244583576718697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2904244583576718697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2904244583576718697'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2012/04/distributed-transactions-failure.html' title='Distributed Transactions Failure Simulation'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8684562160659145715</id><published>2012-02-02T03:23:00.000-08:00</published><updated>2012-02-02T06:05:46.622-08:00</updated><title type='text'>Atomikos distributed transactions scalability</title><content type='html'>At this moment I&#39;m working on the project where we using distributed transactions. The number of XA Resources in our case is not big at all, but for me is very interesting to know how Atomikos can scale when the number of XA Resources is large. That is why you are reading this blog post.  I&#39;ve desided to push this pet project on GitHub for you to be able to test/play/join the effort, etc. - &lt;a href=&quot;https://github.com/daoway/AtomikosDistributedScalability&quot;&gt;https://github.com/daoway/AtomikosDistributedScalability&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What do I have... I have Atomikos 3.7.1, Spring 3.1 (if you are still using 3.0 consider migration to 3.1 - it&#39;s better) and Hibernate. In this particular case I&#39;ve decided to use embedded in memory H2 database to eliminate possible network overhead and to simplify setup of underlying farm of XA Resources. It&#39;s possible because H2 has XA compatible data source implementation. BTW, it can be used also for unit/integration testing instead of Oracle XA Datasource to test transactional behavior for example.&lt;br /&gt;&lt;br /&gt;So, I&#39;m playing with H2 XA Army. I have a lot of in-memory H2 database instances, one simple domain object and Hibernate. I want to persist this object across all nodes in XA transaction and calculate time for this effort. Then increase the number of XA resources for some Delta and repeat this procedure until I&#39;ll get OutOfMemoryException. Just kidding :) All this stuff is in-memory and RAM amount is limited, for sure, the maximum of XA resource I&#39;ve played with was 2000.&lt;br /&gt;&lt;br /&gt;Here is the result of my experiment (click on link to see Adobe Flex chart with test results) :&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://dl.dropbox.com/u/282185/bin-release/XAResourceChart.html&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 170px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUdFEPktqc1HRSwMD6YKcyUSk_OVl-7Jvorkv6TDD-MwxKgheXF0QOnH-f4xHx5kANFq272hls7ETGQtZ_WV4Or1GtbQBdxW7DFush7GPRqMxsA8V5OdjWVqhC57CFTtaifOy3wA/s320/atimikos.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5704536653613963506&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;As you can see, replication time grows linear, together with number of XA resources participating in &quot;distributed&quot; transaction. If so, we can conclude that Atomikos has linear scalability.&lt;br /&gt;&lt;br /&gt;Thanks for reading. Any comments/suggestions are welcomed.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/8684562160659145715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/8684562160659145715' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8684562160659145715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8684562160659145715'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2012/02/atomikos-distributed-transactions.html' title='Atomikos distributed transactions scalability'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUdFEPktqc1HRSwMD6YKcyUSk_OVl-7Jvorkv6TDD-MwxKgheXF0QOnH-f4xHx5kANFq272hls7ETGQtZ_WV4Or1GtbQBdxW7DFush7GPRqMxsA8V5OdjWVqhC57CFTtaifOy3wA/s72-c/atimikos.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6401844066169495397</id><published>2011-05-25T09:16:00.000-07:00</published><updated>2011-05-25T10:00:13.101-07:00</updated><title type='text'>Loading Spring Beans based on environment</title><content type='html'>In complex deployment environments it makes sense to keep web application monolith war file and provide appropriate instructions for deployment team. It&#39;s possible only if your application have flexible configurability strategy, so that at least you can switch from DEV to UAT, from UAT to PROD environments and be sure that only thing has been changed is environment specific stuff. Forget about unpacking and patching war-file, it could be prohibited at all because of non-trivial distribution mechanism.&lt;br /&gt;&lt;br /&gt;For Spring-based applications all this could look a little bit scary for a first look, you have your applicationContext.xml with placeholders, which is ok, or JNDI for enviromnent-specific resource lookup. Great, but what you are going to do if some of the parts of resources are present in one env. and absent in another ? For example +1 in dev, -1 in uat and +1 in prod ? Maybe there is not only one way to do it, but I came across the following solution for this.&lt;br /&gt;&lt;br /&gt;It&#39;s based on combination of servlet context init params and Spring bean re-definition at runtume. Thanks to Spring it&#39;s possible. In terms of configurability servlet init params is very flexible thing. You can define one in web.xml, and then redefine it in context setup. I mean externally, so, your war file is still don&#39;t need to be patched. Other stuff is technical details for this - key point to implement this is Spring bean which implements both ServletContextAware and ApplicationContextAware interfaces. First makes possible to access Servlet context, second - Spring application context. Runtime re-defintion is not so hard - take a look &lt;a href=&quot;http://code.google.com/p/ostas-blog-src/source/browse/trunk/SpringBeanRuntime/src/main/java/com/blogspot/ostas/spring/MyApplicationConfiguratorBean.java&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Complete source code you can find &lt;a href=&quot;http://code.google.com/p/ostas-blog-src/source/browse/#svn%2Ftrunk%2FSpringBeanRuntime&quot;&gt;here&lt;/a&gt;.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6401844066169495397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/6401844066169495397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6401844066169495397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6401844066169495397'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/05/loading-spring-beans-based-on.html' title='Loading Spring Beans based on environment'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2420552747219420604</id><published>2011-04-15T01:39:00.000-07:00</published><updated>2011-04-15T01:54:54.465-07:00</updated><title type='text'>Java code block in JIRA</title><content type='html'>This is just small hint on JIRA usage.&lt;br /&gt;&lt;br /&gt;If you want to post some source code example in JIRA issue, please use code blocks ! Other vice you&#39;ll have a chance to see fancy smiles instead of certain pieces of code. I saw it few times, very annoying...&lt;br /&gt;&lt;br /&gt;It&#39;s not hard at all:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;{code} public static void main(String[] args)  {code}&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://confluence.atlassian.com/display/DOC/Code+Block+Macro&quot;&gt;Other languages are also supported.&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2420552747219420604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/2420552747219420604' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2420552747219420604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2420552747219420604'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/04/java-code-block-in-jira.html' title='Java code block in JIRA'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-3712843152440754029</id><published>2011-02-25T03:21:00.000-08:00</published><updated>2011-02-25T03:34:24.496-08:00</updated><title type='text'>Precompile JSP with Maven 2</title><content type='html'>There are situations where JDK is banned in production and only JRE allowed for use. In this case if you are using JSP there is only one option to use - precompile JSP. Here is example how to achieve that. Nothing very special, but I guess this can save some time and effort for somebody )&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.codehaus.mojo&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jspc-maven-plugin&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;executions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jspc&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;                     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;compile&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;                 &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;executions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.apache.maven.plugins&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;maven-war-plugin&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;             &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;webXml&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;${basedir}/target/jspweb.xml&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;webXml&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;warSourceExcludes&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;**/*.jsp&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;warSourceExcludes&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;WarSourceExcludes will not package original JSPs - really makes no sence since they are just classes and appropriate servlet mappins in web.xml now.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/3712843152440754029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/3712843152440754029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3712843152440754029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/3712843152440754029'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/02/precompile-jsp-with-maven-2.html' title='Precompile JSP with Maven 2'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7639157585613645590</id><published>2011-02-19T07:17:00.000-08:00</published><updated>2011-02-19T08:09:06.204-08:00</updated><title type='text'>Mock JNDI in jUnit</title><content type='html'>JNDI is very useful technology. But... not everywhere. If there is the need to deploy your application on variety of different environments, for example databases with sensitive data and you are not a person who is suitable to deploy application for a bunch of reasons - segregation of concepts, separate production team, etc - JNDI is what you need. If you are with JNDI, only thing you have to provide is JNDI names with example config, so that person responsible for deployment could figure out how to deal with it. Just imagine the mess when you need to deploy war file for ~10 different Oracle databases and the same number of WebSphere MQ queues without JNDI. Think for 1 min :)&lt;br /&gt;&lt;br /&gt;But, in development is not so pleasant to have a deal with JNDI, since container required in this case to perform actual lookup of resources. From the other point of view not all so bad, since there is a way in 10 lines of code to mock required JNDI datasource. In fact it could be any other resource, but data source seems to be the most popular.&lt;br /&gt;&lt;br /&gt;Key point here is the use of the calss from SpringSource -&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;org.springframework.mock.jndi.SimpleNamingContextBuilder&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is the complete example how to use it -&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; com&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;blogspot&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;ostas&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;cxf&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;SimpleDao&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; oracle&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;jdbc&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;pool&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;OracleDataSource&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;apache&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;log4j&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Logger&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;BeforeClass&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Test&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;runner&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;RunWith&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;springframework&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;factory&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;annotation&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Autowired&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;springframework&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;mock&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;jndi&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;SimpleNamingContextBuilder&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;springframework&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;ContextConfiguration&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;springframework&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;junit4&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;SpringJUnit4ClassRunner&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;naming&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;NamingException&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; java&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;sql&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;SQLException&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; static org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Assert&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;assertEquals&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; static org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;junit&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Assert&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;assertNotNull&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;@RunWith(SpringJUnit4ClassRunner.class)&lt;br /&gt;@ContextConfiguration(locations=&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;classpath:/WEB-INF/dataAccess-applicationContext.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; DaoTestCase&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; Logger logger &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; Logger&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getLogger&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;DaoTestCase&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;class&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getName&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;@&lt;/span&gt;BeforeClass&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; setUp&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    OracleDataSource ods &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;try&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        ods &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;new&lt;/span&gt; OracleDataSource&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;catch&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;SQLException&lt;/span&gt; e&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        logger&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;error&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;e&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;    ods&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;setURL&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;jdbc:oracle:thin:@127.0.0.1:1521/orcldb&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    ods&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;setUser&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;*&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    ods&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;setPassword&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;*&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    SimpleNamingContextBuilder builder &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;try&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        builder &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; SimpleNamingContextBuilder&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;emptyActivatedContextBuilder&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;        builder&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;bind&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;java:comp/env/jdbc/db&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;ods&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;catch&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;NamingException e&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        logger&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;error&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;e&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;@&lt;/span&gt;Autowired&lt;br /&gt;SimpleDao simpleDao&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;@&lt;/span&gt;Test&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; testInjectBean&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;throws&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Exception&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    logger&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;debug&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;Bean : &gt;&gt;&gt; &quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;+&lt;/span&gt; simpleDao&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    assertNotNull&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;simpleDao&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;@&lt;/span&gt;Test&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; testDBconnection&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;throws&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Exception&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    assertEquals&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;simpleDao&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getNumber&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As you can see from this code, actual mock is just&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);&quot;&gt;SimpleNamingContextBuilder builder = null&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;try &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  builder &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; SimpleNamingContextBuilder&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;emptyActivatedContextBuilder&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  builder&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;bind&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;java:comp/env/jdbc/db&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;ods&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt; catch (NamingException e) &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    logger&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;error&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;e&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;ods - just plain DataSource. From Spring point jdbc/db looks llike this -&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;color: rgb(0, 0, 0); background: none repeat scroll 0% 0% rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;dataSource&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;org.springframework.jndi.JndiObjectFactoryBean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;jndiName&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;java:comp/env/jdbc/db&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The last thing I have to mention here is Maven2 dependency for use SimpleNamingContextBuilder class -&lt;br /&gt;&lt;br /&gt;&lt;pre style=&#39;color:#000000;background:#ffffff;&#39;&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;dependency&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;groupId&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;org.springframework&lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;groupId&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;artifactId&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;spring-test&lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;artifactId&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;version&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;3.0.3.RELEASE&lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;version&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;scope&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;test&lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;scope&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;dependency&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7639157585613645590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/7639157585613645590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7639157585613645590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7639157585613645590'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2011/02/mock-jndi-resources-in-unit-tests.html' title='Mock JNDI in jUnit'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7388568895791319299</id><published>2010-02-22T13:26:00.000-08:00</published><updated>2010-02-22T14:08:09.322-08:00</updated><title type='text'>Generate Maven2 Archetype from existing project</title><content type='html'>It&#39;s not hard to create custom archetype in Maven 2.2 from existing project. I had multi-module  .ear Maven project which I want to reuse. So, I decided to play a little with custom archetypes to create my own and don&#39;t repeat myself again and again. Fixing dependencies manually - is not the best way to spend lifetime :)&lt;br /&gt;&lt;br /&gt;To jumpstart archetype creaton there is a special maven goal of archetype plugin archetype:&lt;span style=&quot;font-weight: bold;&quot;&gt;create-from-project&lt;/span&gt;. So,&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn clean archetype:create-from-project&lt;/blockquote&gt;Now we have prototype of our archetype in target\generated-sources\archetype\ directory.&lt;br /&gt;Then...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;cd target\generated-sources\archetype\&lt;br /&gt;mvn install&lt;br /&gt;&lt;/blockquote&gt;Friendly speaking, I had to do some tweaking to successfully generate normal .ear Maven 2 project which can be compiled and run without problems. It was fixing some of dependencies at Logic and EAR modules, bit it was not hard - just specifying ${groupId} where necessary.  To use this archetype after &quot;mvn install&quot; just type&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn archetype:generate&lt;br /&gt;&lt;/blockquote&gt;and choose EnterpriseApp-archetype from the list. It will looks like....&lt;br /&gt;&lt;blockquote&gt;2: local -&gt; EnterpriseApp-archetype (EnterpriseApp-archetype)&lt;br /&gt;....&lt;br /&gt;&lt;/blockquote&gt;in the list.&lt;br /&gt;&lt;br /&gt;Source code is here : http://ostas-blog-src.googlecode.com/svn/trunk/JbossCargoJpaEjbWebEarArchetype/.&lt;br /&gt;&lt;br /&gt;To build it use&lt;br /&gt;&lt;blockquote&gt;svn co http://ostas-blog-src.googlecode.com/svn/trunk/JbossCargoJpaEjbWebEarArchetype/&lt;br /&gt;&lt;br /&gt;mvn install&lt;/blockquote&gt;You&#39;ll need to specify your jboss home location at parent pom.xml file to use cargo-jboss deployment. In my case it is&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre style=&#39;color:#000000;background:#ffffff;&#39;&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;jboss.home&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;C:/server/Java/jboss-4.2.2.GA/&lt;span style=&#39;color:#a65700; &#39;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&#39;color:#5f5035; &#39;&gt;jboss.home&lt;/span&gt;&lt;span style=&#39;color:#a65700; &#39;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;If you have any comments/issues/suggestions give me to know.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7388568895791319299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/7388568895791319299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7388568895791319299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7388568895791319299'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2010/02/generate-maven2-archetype-from-existing.html' title='Generate Maven2 Archetype from existing project'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4518727968551638144</id><published>2009-09-22T04:34:00.000-07:00</published><updated>2009-09-22T05:18:55.830-07:00</updated><title type='text'>Screenshot of Web Page in Python - 15 lines of code</title><content type='html'>I cant say that this solution is pretty elegant, but it&#39;s short and working. But... platform dependent, because of IE. Anyway here it is :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;from&lt;/span&gt; win32com&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;client &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; Dispatch&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;from&lt;/span&gt; time &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; sleep&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;from&lt;/span&gt; sys &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: rgb(227, 74, 220);&quot;&gt;exit&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; ImageGrab&lt;br /&gt;&lt;br /&gt;IE&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;Dispatch&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;InternetExplorer.Application&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;IE&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;Visible&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;1&lt;/span&gt;&lt;br /&gt;IE&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;fullScreen &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;1&lt;/span&gt;&lt;br /&gt;IE&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;Navigate&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;http://ostas.blogspot.com&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;IE&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;ReadyState &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;:&lt;/span&gt;&lt;br /&gt; sleep&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;img &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; ImageGrab&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;grab&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;1440&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;900&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;img&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;save&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;screenshot.jpg&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;JPEG&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;IE&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;Quit&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(227, 74, 220);&quot;&gt;exit&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Code is pretty simple- it launches IE in full screen mode, waiting while page being loaded, makes screenshot of whole screen resolution - 1440 x 900 in my case, and happily exits.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4518727968551638144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/4518727968551638144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4518727968551638144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4518727968551638144'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/09/screenshot-of-web-page-in-python-15.html' title='Screenshot of Web Page in Python - 15 lines of code'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-565887218825559442</id><published>2009-04-16T04:32:00.000-07:00</published><updated>2009-04-16T05:40:57.057-07:00</updated><title type='text'>Google XML Pages - HelloWorld app with source code</title><content type='html'>Last time I blogged was October 20, 2008... Wow ! Time is going so fast ! I&#39;m really appreciate my readers who stayed with me and keep signing up using feedburner. You rock ! :)&lt;br /&gt;&lt;br /&gt;So, to be closer to topic... &lt;a href=&quot;http://google-opensource.blogspot.com/2008/07/google-xml-pages-functional-markup.html&quot;&gt;Google XML Pages&lt;/a&gt; or GXP - seems to be interesting since it has been used in an army Google products -  &lt;a href=&quot;http://www.google.com/adsense/&quot;&gt;AdSense&lt;/a&gt;, &lt;a href=&quot;http://www.blogger.com/&quot;&gt;Blogger&lt;/a&gt;, and &lt;a href=&quot;http://reader.google.com/&quot;&gt;Google Reader&lt;/a&gt;. I have some previous Apache Velocity experience, so the questions are what GXP is, what the differences between the two if any, performance ? I&#39;ll try to highlight some of this points in my next post, but for now - just hello world app.&lt;br /&gt;&lt;br /&gt;There is a lot of information about GXP, almost all of this info - just annonce. No code, no example...&lt;br /&gt;Our GXP template loooks like this :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;template&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;com.google.code.projects.BlogSrc.GxpApp.HelloGxp&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.w3.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/1999/xhtml&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;google.com&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/2001/gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;java&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;google.com&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/2001/gxp/code/java&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;call&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;google.com&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/2001/gxp/call&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;gxp:ispace&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;preserve&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;gxp:espace&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;collapse&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;content-type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;text/plain&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;java.util.List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;param&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;java:type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;List{Integer}&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;loop&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;listItem&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;iterable&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;Value : &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;eval&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;expr&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;listItem&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;loop&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;template&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What do we have here ? Template which takes as param List&lt;integer&gt; with name &quot;list&quot;, iterates &lt;span class=&quot;ref_result&quot;&gt;through&lt;/span&gt; list and print values stored in it. As you can see, template code is XML, actually. But ! After compiling this XML using GXP compiler we&#39;ll get Java source file with appropriate API for calling our template. Java method for calling template looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;br /&gt;void write(&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; java.lang.Appendable gxp$out,&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; com.google.gxp.base.GxpContext gxp_context,&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; List&amp;lt;Integer&gt; list)&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;throws&lt;/span&gt; java.io.IOException&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; java&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;util&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Locale&lt;/span&gt; gxp_locale &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; gxp_context&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getLocale&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;gxp$out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(15, 105, 255);&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;boolean&lt;/span&gt; gxp$bool$&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Integer&lt;/span&gt; listItem &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;:&lt;/span&gt; list&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;gxp$bool$&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   gxp$out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   gxp$bool$&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt; gxp$out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(15, 105, 255);&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;Value : &quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;                                      &lt;br /&gt; com&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;google&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;gxp&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;text&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;PlaintextAppender&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;INSTANCE&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;gxp$out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; gxp_context&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;listItem&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt; gxp$out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(15, 105, 255);&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;gxp$out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(15, 105, 255);&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Please notice list and listItem variables and their types. The last step is actually put some param and get result. The name of our tempale is com.google.code.projects.BlogSrc.GxpApp.HelloGxp, the name of file is HelloGxp.gxp. Result of template compilation is a java file - HelloGxp.java in package &quot;com.google.code.projects.BlogSrc.GxpApp&quot;. Simplest way to run tempale code is just call static write() method from generated class HelloGxp. Something like this :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; com&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;google&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;code&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;projects&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;BlogSrc&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;GxpApp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; com&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;google&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;base&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;GxpContext&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; com&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;google&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;HtmlClosure&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; com&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;google&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;gxp&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;base&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;GxpClosure&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; java&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;io&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; java&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;util&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; MyHelloWorld&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;StringWriter&lt;/span&gt; out &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;StringWriter&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;GxpContext gxpContext &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;    createGxpContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Locale&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;US&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;GxpContext createGxpContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Locale&lt;/span&gt; locale&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;boolean&lt;/span&gt; useXmlSyntax&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;new&lt;/span&gt; GxpContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;locale&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; useXmlSyntax&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; testHello&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;throws&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Exception&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;&gt;&lt;/span&gt; list &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Integer&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  list&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  HelloGxp&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;write&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; gxpContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;list&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; main&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt; args&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; MyHelloWorld obj &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;new&lt;/span&gt; MyHelloWorld&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;try&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;         obj&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;testHello&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt; s &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; obj&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getBuffer&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;toString&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;println&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;s&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Exception&lt;/span&gt; ex&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;         ex&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;printStackTrace&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Complete source code you can find &lt;a href=&quot;http://code.google.com/p/ostas-blog-src/source/browse/&quot;&gt;here&lt;/a&gt;. &lt;/integer&gt;&lt;br /&gt;&lt;br /&gt;GxpHelloWorldMavenBuild - the same project but for use with Maven 2.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/565887218825559442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/565887218825559442' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/565887218825559442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/565887218825559442'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2009/04/google-xml-pages-helloworld-app-with.html' title='Google XML Pages - HelloWorld app with source code'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4049029439468325478</id><published>2008-10-20T04:28:00.000-07:00</published><updated>2008-10-20T04:37:14.835-07:00</updated><title type='text'>Google App Engine will support Java ? Cool !</title><content type='html'>Well, I don&#39;t believe yet, but it seems to be that Java will be supported on GAP !&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;At the recently Google Developers Day in Bangalore, Keynote speaker Prasad Ram said that Google App Engine will now support Java.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Source &lt;a href=&quot;http://technofriends.in/2008/10/20/google-app-engine-to-support-java/&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://www.controlenter.in/2008/10/google-developer-day-bangalore-google-app-engine-to-support-java-android-sdk-release-on-oct-22/&quot;&gt;here&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4049029439468325478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/4049029439468325478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4049029439468325478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4049029439468325478'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/10/google-app-engine-will-support-java.html' title='Google App Engine will support Java ? Cool !'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-8084761941053376760</id><published>2008-10-09T01:41:00.000-07:00</published><updated>2008-10-09T05:37:46.145-07:00</updated><title type='text'>JBoss EJB3 Integration testing with Maven2 and Cargo</title><content type='html'>One of the most boring things in EJB development is that we need container. Compile-Build-Deploy-Run_some_testing_code - this is to long cycle to repeat it frequently without some kind of automation. I&#39;ll show you one of the possible ways to simplify this stuff. There are others, but I didn&#39;t tried them (I mean jboss microcontainer here). It&#39;s not complex, but it works and probably could be portable solution for not only my case.&lt;br /&gt;&lt;br /&gt;So, my working environment is the following : Maven 2, JBoss 4.2.2 GA, jUnit 3.8.1 and of course EJB3. Build lifecycle with Maven 2 consists of &lt;a href=&quot;http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html&quot;&gt;some phases&lt;/a&gt;, like &quot;...compile,test,package,integration-test...&quot;. Ok, with package and compile phases all is clear. Test... we need jboss to be up and running before we can test anything. How to start and stop jboss automatically during build ? The answer is &lt;a href=&quot;http://cargo.codehaus.org/Maven2+plugin&quot;&gt;Cargo with Maven2 plugin&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Cargo is a thin wrapper around existing containers (e.g. J2EE containers). It provides different APIs to easily manipulate containers.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Now we can assign &quot;start container&quot; and &quot;stop container&quot; goals to some Maven 2 build phase. First of all, we are interested in integration-test. Also we need to skip junit tests before integration test. To achieve this I&#39;m using this config for cargo plugin :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.codehaus.cargo&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;cargo-maven2-plugin&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;0.3-SNAPSHOT&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;container&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;containerId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jboss4x&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;containerId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;home&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;${jboss.home}&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;home&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;append&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;false&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;append&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;container&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;existing&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;home&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;${jboss.home}/server/default&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;home&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.jboss.configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;default&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.jboss.configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.rmi.port&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;1099&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.rmi.port&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.logging&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;high&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.logging&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;wait&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;false&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;wait&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;executions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;start-container&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;phase&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;pre-integration-test&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;phase&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;start&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;stop-container&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;phase&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;post-integration-test&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;phase&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;stop&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;executions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;    &lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And this for surefire - to be able to run junit tests on integration-test phase, after container started at pre-integration-test phase :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                                      &lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.apache.maven.plugins&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;maven-surefire-plugin&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                            &lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;skip&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;true&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;skip&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                       &lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                           &lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;executions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                               &lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                             &lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;surefire-it&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                 &lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;phase&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;integration-test&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;phase&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;      &lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                              &lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;test&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                 &lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                             &lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                      &lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;skip&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;false&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;skip&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                &lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                     &lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                            &lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;executions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                              &lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;I haven&#39;t any luck with &quot;standalone&quot; type configuration. I should say that when&quot;existing&quot; jboss installation is used here, overall process is quite fast:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;[INFO] -------------------------------------------&lt;br /&gt;[INFO] BUILD SUCCESSFUL&lt;br /&gt;[INFO] -------------------------------------------&lt;br /&gt;[INFO] Total time: 42 seconds&lt;br /&gt;[INFO] Finished at: Thu Oct 09 15:15:39 EEST 2008&lt;br /&gt;[INFO] Final Memory: 9M/19M&lt;br /&gt;[INFO] -------------------------------------------&lt;br /&gt;&lt;/blockquote&gt;42 seconds to compile code, package jar, copy jar to deploy dir, start jboss, run junit test, stop jboss and all this by doing just &quot;mvn install&quot; !&lt;br /&gt;&lt;br /&gt;Complete source code available via svn &lt;a href=&quot;http://code.google.com/p/ostas-blog-src/source/checkout&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;PS.&lt;br /&gt;Time can be very different. My hardware is &lt;a href=&quot;http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2FCompaq-Business-Notebook-6820s-Widescreen%2Fdp%2FB000VG2K0Q&amp;amp;tag=myitwo-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325&quot;&gt;HP 6820s laptop&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=myitwo-20&amp;amp;l=ur2&amp;amp;o=1&quot; alt=&quot;&quot; style=&quot;border: medium none  ! important; margin: 0px ! important;&quot; width=&quot;1&quot; border=&quot;0&quot; height=&quot;1&quot; /&gt;. BTW, executing &quot;mvn -o install&quot; takes 23 sec :)&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/8084761941053376760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/8084761941053376760' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8084761941053376760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/8084761941053376760'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/10/jboss-ejb3-integration-testing-with.html' title='JBoss EJB3 Integration testing with Maven2 and Cargo'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7937123265943718284</id><published>2008-10-03T07:00:00.000-07:00</published><updated>2008-10-03T07:39:29.940-07:00</updated><title type='text'>Build EJB3 with Maven 2 example with source code</title><content type='html'>My posts (the &lt;a href=&quot;http://ostas.blogspot.com/2007/03/build-ejb3-with-maven-2.html&quot;&gt;first&lt;/a&gt; and the &lt;a href=&quot;http://ostas.blogspot.com/2007/07/build-ejb3-with-jboss-and-maven-2.html&quot;&gt;second&lt;/a&gt;) about how to build EJB3 using Maven 2 was very popular. This post is some kind of update, but now, with complete source code. BTW, I&#39;m going to publish some of sources I mentioned at my blog posts, since readers are asking for them. I mean source code from &lt;a href=&quot;http://ostas.blogspot.com/2008/03/search-with-spring-hibernate-lucene-and.html&quot;&gt;this&lt;/a&gt; post at minimum.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://code.google.com/p/ostas-blog-src/&quot;&gt;&lt;br /&gt;So, here it is !&lt;/a&gt; In my further posts I&#39;m going to highlight some of pitfalls one can face with.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7937123265943718284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/7937123265943718284' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7937123265943718284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7937123265943718284'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/10/build-ejb3-with-maven-2-example-with.html' title='Build EJB3 with Maven 2 example with source code'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2858317885681805188</id><published>2008-08-27T02:17:00.000-07:00</published><updated>2008-08-27T02:19:05.367-07:00</updated><title type='text'>Yet another Java Puzzle</title><content type='html'>No words here, just the code :)&lt;br /&gt;&lt;br /&gt;&lt;pre style=&#39;color:#000000;background:#ffffff;&#39;&gt;&lt;span style=&#39;color:#800000; font-weight:bold; &#39;&gt;class&lt;/span&gt; String&lt;br /&gt;&lt;span style=&#39;color:#800080; &#39;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style=&#39;color:#800000; font-weight:bold; &#39;&gt;public&lt;/span&gt; &lt;span style=&#39;color:#800000; font-weight:bold; &#39;&gt;static&lt;/span&gt; &lt;span style=&#39;color:#bb7977; &#39;&gt;void&lt;/span&gt; main&lt;span style=&#39;color:#808030; &#39;&gt;(&lt;/span&gt;&lt;span style=&#39;color:#bb7977; font-weight:bold; &#39;&gt;String&lt;/span&gt; args&lt;span style=&#39;color:#808030; &#39;&gt;[&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;]&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;)&lt;/span&gt;&lt;br /&gt;    &lt;span style=&#39;color:#800080; &#39;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style=&#39;color:#bb7977; font-weight:bold; &#39;&gt;String&lt;/span&gt; &lt;span style=&#39;color:#bb7977; font-weight:bold; &#39;&gt;String&lt;/span&gt;  &lt;span style=&#39;color:#808030; &#39;&gt;=&lt;/span&gt; &lt;span style=&#39;color:#800000; font-weight:bold; &#39;&gt;new&lt;/span&gt; &lt;span style=&#39;color:#bb7977; font-weight:bold; &#39;&gt;String&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;(&lt;/span&gt;&lt;span style=&#39;color:#808030; &#39;&gt;)&lt;/span&gt;&lt;span style=&#39;color:#800080; &#39;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&#39;color:#800080; &#39;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&#39;color:#800080; &#39;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2858317885681805188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/2858317885681805188' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2858317885681805188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2858317885681805188'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/08/yet-another-java-puzzle.html' title='Yet another Java Puzzle'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4854219974994604179</id><published>2008-07-25T03:22:00.000-07:00</published><updated>2008-07-25T03:41:09.050-07:00</updated><title type='text'>Wow ! DZone.com using Acegi Security !</title><content type='html'>I&#39;ve seen a very interesting alert box with exception message at dzone.com when tried to vote up for the post. It was something like &quot;org.acegisecurity....&quot;. Hey, wait a minute, it is Acegi ! Really, login form looks as so&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;method&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;post&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;/links/j_acegi_security_check&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;loginform&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;addlinkform&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;Username:&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;text&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;txt&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;j_username&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;size&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;20&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;Password:&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;password&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;txt&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;j_password&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;size&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;20&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;http://zones.dzone.com/user/password&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;   class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;forgotpass&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; Forgot password?&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;cbx&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;checkbox&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;_acegi_security_remember_me&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;checked&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt; remember me&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;label&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;submit&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;submit&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;onsubmit&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;lightbox.prototype.deactivate();&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;Login&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;rel&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;deactivate&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;lbAction&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;#&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;button&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;Cancel&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;                   &lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;j_acegi_security_check, j_username, j_password, _acegi_security_remember_me - it seems to be really Acegi !&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4854219974994604179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/4854219974994604179' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4854219974994604179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4854219974994604179'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/07/wow-dzonecom-using-acegi-security.html' title='Wow ! DZone.com using Acegi Security !'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4237536948323660521</id><published>2008-07-22T05:03:00.000-07:00</published><updated>2008-07-22T05:16:03.496-07:00</updated><title type='text'>Struts 2 : Deprecate or remove Dojo plugin</title><content type='html'>Sometimes it is very useful to read struts-dev mailing list. See &lt;a href=&quot;http://www.nabble.com/-PROPOSAL--Deprecate-or-remove-Dojo-plugin-td18573704.html&quot;&gt;here.&lt;/a&gt; In fact I&#39;m very happy of that, because I was going to use some AJAX with Struts 2 and Dojo plugin.  One thing I couldn&#39;t figure out is why Dojo ?? Why not Prototype ? Why not jQuery ? Well, OK. If developers using Dojo, I will do the same. Now the situtation is more clear and I&#39;m not going to use Dojo anymore. Maybe Prototype ? :)&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4237536948323660521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/4237536948323660521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4237536948323660521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4237536948323660521'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/07/struts-2-deprecate-or-remove-dojo.html' title='Struts 2 : Deprecate or remove Dojo plugin'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-2606936452540750419</id><published>2008-07-18T04:04:00.000-07:00</published><updated>2008-07-18T05:24:27.511-07:00</updated><title type='text'>A little bit of dependency injection with Struts 2 and Spring 2</title><content type='html'>I&#39;m using Struts 2 + Hibernate 3 + Spring 2 for my current project. I have to admit that Struts+Spring integration is really easy. The key integration point is &lt;a href=&quot;http://struts.apache.org/2.x/docs/spring-plugin.html&quot;&gt;Struts 2 Spring plugin&lt;/a&gt;. I&#39;ll not repeat the docs here. Only one thing I should admit that I prefer to handle spring dependencies by myself because of little bit different version of Spring - 2.0.5 in plugin and 2.0.8 in my project. So, I have this lines in my pom.xml (Maven 2 build file)&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.apache.struts&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;struts2-spring-plugin&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;2.0.11.1&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.springframework&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;spring-beans&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.springframework&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;spring-core&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.springframework&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;spring-context&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.springframework&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;spring-web&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;and&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.springframework&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;spring-core&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;${spring.version}&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;etc. I&#39;m injecting Spring powered services into Struts 2 actions, but I had never had a chance to inject some kind of static list. Now I have, so  the story about it.&lt;br /&gt;&lt;br /&gt;I have a static list of countries. I think it doesn&#39;t make sense to store this info in database. The number of countries is not that large. If so, I need to store this data in some data structure and place it in memory. It could be List or Map - it depends on situation. And init this data structure once application starts. In web app when war file being deployed, Spring&#39;s WebApplicationContext initialized. So, when we define our list as Spring bean, it will be initialized at the application start and will be ready to other manipulations. I&#39;ve defined it as so :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;xml&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;beans&lt;/span&gt; &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.w3.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/2001/XMLSchema-instance&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;util&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/util&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;schemaLocation&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/beans/spring-beans-2.0.xsd&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/util&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/util/spring-util-2.0.xsd&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;util&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;list&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;countryList&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;list-class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;java.util.LinkedList&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;item1&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;item2&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;item3&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;util&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Here is the &lt;a href=&quot;http://forum.springframework.org/showthread.php?t=30584&quot;&gt;one question&lt;/a&gt; on Spring forum and &lt;a href=&quot;http://static.springframework.org/spring/docs/2.0.x/reference/xsd-config.html#xsd-config-body-schemas-util&quot;&gt;official docs&lt;/a&gt; about it. For now we have a LinkedList filled with countries. We are going to inject it into Spring action and then show it at the &quot;view&quot; jsp.&lt;br /&gt;&lt;br /&gt;Please note that id of our list is countryList. In fact it is a name of the bean. It&#39;s name really important since Struts 2 Spring pluring&#39;s default autowiring strategy is by name (I&#39;m using default autowiring type and happy with that). It means that we can use setter injection this way&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; SomeStruts2Action &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;extends&lt;/span&gt; ActionSupport&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;List&lt;/span&gt; countryList&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; setCountryList&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;List&lt;/span&gt; countryList&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;countryList &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; countryList&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Please note that id and class member name with type List are equal. That is all ! But actually not all :) We have to tell where is our list definition is. In my case it&#39;s at one of jars so I have this line in web.xml :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;context-param&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;param-name&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;contextConfigLocation&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;param-name&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;param-value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;classpath:applicationContext-myCountryList.xml,&lt;br /&gt;   /WEB-INF/appContext-web.xml&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;param-value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;context-param&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Have fun !&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/2606936452540750419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/2606936452540750419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2606936452540750419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/2606936452540750419'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/07/little-bit-of-dependency-injection-with.html' title='A little bit of dependency injection with Struts 2 and Spring 2'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-1816348846428408899</id><published>2008-06-05T00:24:00.000-07:00</published><updated>2008-06-05T01:09:49.529-07:00</updated><title type='text'>Spring Security 2.0 : Different target urls for different user roles</title><content type='html'>I&#39;m evaluating Spring Security 2.0. The nice thing - it&#39;s really easier to have deal with it, rather than Acegi Security. I had an xml config file with 250+ LOC with Acegi ! Something like Rocket Science... but it is very flexible and expendable, it is very big plus.&lt;br /&gt;&lt;br /&gt;After all, it is still not so trivial to implement some things which I found very commonly used. But... Spring rocks ! And Spring community rocks even more. I&#39;ve posted message to Spring forum &lt;a href=&quot;http://forum.springframework.org/showthread.php?t=55334&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;Thanks Luke Taylor for pointing me to the right direction.&lt;br /&gt;&lt;br /&gt;Lets imagine we have the same login form for common user and admin and we want admin to be redirected to some kind admin control panel and common user to /home /profile or something like that. In my case customized AuthenticationProcessingFilter will do the trick. The code looks like this :&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;package com&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;mycoolcompany&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;App&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;CustomSecurity&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; javax&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;servlet&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;http&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;HttpServletRequest&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; javax&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;servlet&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;http&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;HttpSession&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; org&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;springframework&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;security&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;Authentication&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; org&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;springframework&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;security&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;AuthenticationException&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; org&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;springframework&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;security&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;GrantedAuthority&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; org&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;springframework&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;security&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;providers&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;br /&gt; UsernamePasswordAuthenticationToken&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt; org&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;springframework&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;security&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;ui&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;webapp&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;br /&gt; &lt;/span&gt;AuthenticationProcessingFilter&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;public class CustomAuthenticationProcessingFilter&lt;br /&gt;extends AuthenticationProcessingFilter&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;@&lt;/span&gt;Override&lt;br /&gt;public Authentication attemptAuthentication&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;HttpServletRequest request&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;throws AuthenticationException &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(96, 48, 0);&quot;&gt;String&lt;/span&gt; username &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; obtainUsername&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;request&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(96, 48, 0);&quot;&gt;String&lt;/span&gt; password &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; obtainPassword&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;request&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;username &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; null&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt; username &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;password &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; null&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  password &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;username &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; username&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;trim&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;UsernamePasswordAuthenticationToken authRequest &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;new UsernamePasswordAuthenticationToken&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;username&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; password&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;// Place the last username attempted into HttpSession for views&lt;/span&gt;&lt;br /&gt;HttpSession session &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; request&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getSession&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;false&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;session &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; null &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;|&lt;/span&gt; getAllowSessionCreation&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  request&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getSession&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;setAttribute&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;SPRING_SECURITY_LAST_USERNAME_KEY&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;br /&gt;escapeEntities&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;username&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;// Allow subclasses to set the &quot;details&quot; property&lt;/span&gt;&lt;br /&gt;setDetails&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;request&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; authRequest&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;//role&amp;amp;URLs stuff&lt;/span&gt;&lt;br /&gt;final Authentication auth &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;&lt;br /&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getAuthenticationManager&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;authenticate&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;authRequest&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;final GrantedAuthority&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; grantedAuthorities &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; auth&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getAuthorities&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;boolean isAdmin &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; false&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;GrantedAuthority grantedAuthority &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt; grantedAuthorities&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;ROLE_SUPERVISOR&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;equals&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;grantedAuthority&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;toString&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;     isAdmin &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; true&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(96, 48, 0);&quot;&gt;String&lt;/span&gt; outcome &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; null&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;isAdmin&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  outcome &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/adminArea&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt; outcome &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/someOtherUserArea&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;//actual change of default url for user&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;setDefaultTargetUrl&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;outcome&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;return&lt;/span&gt; auth&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;public &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: rgb(96, 48, 0);&quot;&gt;String&lt;/span&gt; escapeEntities&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(96, 48, 0);&quot;&gt;String&lt;/span&gt; s&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;StringBuffer sb &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; new StringBuffer&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;int&lt;/span&gt; i&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt; i &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;&amp;lt;&lt;/span&gt; s&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;length&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt; i&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;char&lt;/span&gt; c &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; s&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;charAt&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;i&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;        &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;c &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&amp;lt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&amp;amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;c &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&amp;amp;gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;c &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&quot;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&amp;amp;#034;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;c &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;\&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&amp;amp;#039;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;            sb&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;c&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;return&lt;/span&gt; sb&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;toString&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;And XML config :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;xml&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;&quot;1.0&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;?&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;beans&lt;/span&gt; &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/security&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.w3.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/2001/XMLSchema-instance&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(7, 71, 38);&quot;&gt;schemaLocation&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/beans/spring-beans-2.0.xsd&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/security&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: rgb(85, 85, 221);&quot;&gt;www.springframework.org&lt;/span&gt;&lt;span style=&quot;color: rgb(64, 1, 90);&quot;&gt;/schema/security/spring-security-2.0.1.xsd&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;http&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;auto-config&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;entry-point-ref&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;authenticationProcessingFilterEntryPoint&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;intercept-url&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt; pattern&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/secure/extreme/**&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;access&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;ROLE_SUPERVISOR&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;intercept-url&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt; pattern&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/someDefaultUrl/**&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt; access&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;ROLE_SUPERVISOR&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;intercept-url&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/secure/**&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt; access&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;IS_AUTHENTICATED_REMEMBERED&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;intercept-url&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;pattern&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/**&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt; access&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;IS_AUTHENTICATED_ANONYMOUSLY&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;anonymous&lt;/span&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;http&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;    Usernames/Passwords are&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;        rod/koala&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;        dianne/emu&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;        scott/wombat&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;        peter/opal&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;--&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;authentication-provider&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;password-encoder&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;hash&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;md5&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;user-service&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;user&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;rod&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;password&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;a564de63c2d0da68cf47586ee05984d7&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;authorities&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;ROLE_SUPERVISOR, ROLE_USER, ROLE_TELLER&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;user&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;dianne&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;password&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;65d15fe9156f9c4bbffd98085992a44e&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;authorities&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;ROLE_USER,ROLE_TELLER&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;user&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;scott&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;password&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;2b58af6dddbd072ed27ffc86725d7d3a&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;authorities&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;ROLE_USER&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;user&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;peter&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;password&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;22b5c9accc6e1ba628cedc63a72d57f8&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;authorities&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;ROLE_USER&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;user-service&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;authentication-provider&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;authentication-manager&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;alias&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;authenticationManagerAlias&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;authenticationProcessingFilterEntryPoint&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;org.springframework.security.ui.webapp.&lt;br /&gt;AuthenticationProcessingFilterEntryPoint&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt; name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;loginFormUrl&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/login.jsp&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;forceHttps&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;myAuthenticationProcessingFilter&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;com.mycoolcompany.App.CustomSecurity.&lt;br /&gt;CustomAuthenticationProcessingFilter&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;filterProcessesUrl&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/j_spring_security_check&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;&lt;br /&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;defaultTargetUrl&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;/someDefaultUrl/index.jsp&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;authenticationManager&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;ref&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;authenticationManagerAlias&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;custom-filter&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;AUTHENTICATION_PROCESSING_FILTER&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The end.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/1816348846428408899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/1816348846428408899' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1816348846428408899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1816348846428408899'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/06/spring-security-20-different-target.html' title='Spring Security 2.0 : Different target urls for different user roles'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6489958693109562236</id><published>2008-03-12T05:27:00.000-07:00</published><updated>2008-05-05T04:47:49.556-07:00</updated><title type='text'>Search with Spring Hibernate Lucene and Aspect Oriented Programming in action</title><content type='html'>I&#39;ve read a lot about AOP and what it&#39;s used for. It is useful for logging, tracing, declarative transactions management and even caching. Great ! I&#39;m going to share with you yet another AOP use case. BTW, I found it really interesting. So, the story.&lt;br /&gt;&lt;br /&gt;I have some entity with with field &quot;content&quot;  which is HTML text. The number of entries is large and keep growing. It is natural that I want to find some entry which contain some text. So, I need search. Since text is in HTML format, database full text search is not the best solution possible. I&#39;ve decided to try &lt;a href=&quot;http://lucene.apache.org/java/docs/index.html&quot;&gt;Lucene&lt;/a&gt;. It is                  a &quot;high-performance, full-featured text search engine library&quot;. To use Lucene I need to crate an index, add my objects into it and then I will able to query index to get search results.&lt;br /&gt;&lt;br /&gt;Since I&#39;m using Spring, I was looking for Lucene-Spring integration. Bingo ! It is available as one of Spring modules project. This integration has two aspects - one for index management and another for performing actual search. Complete configuration :&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;fsDirectory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;org.springmodules.lucene.index.support.FSDirectoryFactoryBean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;location&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;file:///C:/temp/index&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;alias&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;fsDirectory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;alias&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexDirectory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexFactory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;org.springmodules.lucene.index.support.SimpleIndexFactoryBean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;directory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;           &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;ref&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexDirectory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;analyzer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;org.apache.lucene.analysis.standard.StandardAnalyzer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexAccessor&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;com.mycoolcompany.app.search.LuceneIndexerService&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexFactory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;ref&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexFactory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;searcherFactory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;org.springmodules.lucene.search.factory.SimpleSearcherFactory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;directory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;ref&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexDirectory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;searchService&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;com.mycoolcompany.app.search.LuceneSearchService&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;searcherFactory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;ref&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;searcherFactory&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;analyzer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;org.apache.lucene.analysis.standard.StandardAnalyzer&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I can pre-populate index by querying database and adding objects to index. But what to do when new entry has been added ? How to keep index up to date ? After some Googling I found solution with custom hibernate interceptor. It looks like this :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; java&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;io&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Serializable&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;hibernate&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;EmptyInterceptor&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;hibernate&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; CustomHibernateInterceptor &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;extends&lt;/span&gt; EmptyInterceptor&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;long&lt;/span&gt; serialVersionUID &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;1214372449390884955&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;L&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;//injected by spring&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;private&lt;/span&gt; LuceneIndexerService indexAccessor&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; LuceneIndexerService getIndexAccessor&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;return&lt;/span&gt; indexAccessor&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; setIndexAccessor&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;LuceneIndexerService indexAccessor&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;indexAccessor &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; indexAccessor&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;   &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;boolean&lt;/span&gt; onSave&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Object&lt;/span&gt; entity&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Serializable&lt;/span&gt; id&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;Object&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; state&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; propertyNames&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;br /&gt;   Type&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; types&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;entity &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;instanceof&lt;/span&gt; Entry&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;//adding to index&lt;/span&gt;&lt;br /&gt;       indexAccessor&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;Entry&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;entity&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;super&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;onSave&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;entity&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; id&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; state&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; propertyNames&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; types&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Is it something wrong with this solution ? I guess no, it&#39;s working. But I have and idea to use AOP here. I guess, adding to index and persisting object to database at the same time is some king of cross-cutting concern. I&#39;m using a Spring-Hibernate DAO for CRUD operations. My idea to resolve this issue is in using aspect. Aspect has a pointcut defined to intercept execution of my dao method addEntry(Entry entry) and &quot;after&quot; advice - this is the place where we can add object to index, after object has been persisted. Please notice that search service is injected into aspect :) All this stuff is very abstract but is pretty interesting to digg. Here is the source code of aspect :&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;@Aspect&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; IndexForSearchAspect&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; IndexForSearchAspect&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;super&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;//will be injected&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;private&lt;/span&gt; LuceneIndexerService indexAccessor&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; setIndexAccessor&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;LuceneIndexerService indexAccessor&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;indexAccessor &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; indexAccessor&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;//defining pointcut&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;@&lt;/span&gt;Pointcut&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;execution (* ....dao.BlogEntryDao.addEntry(....model.Entry))&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; saveEntryToDB&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;//add object to index after it has been persisted&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;@&lt;/span&gt;After&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;saveEntryToDB()&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; addEntryToLuceneIndex&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;JoinPoint joinpoint&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;//getting argument of dao.addEntry()&lt;/span&gt;&lt;br /&gt; Entry entry &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;Entry&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; joinpoint&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getArgs&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;// adding to index&lt;/span&gt;&lt;br /&gt; indexAccessor&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;entry&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Spring configuration for aspect :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 22);&quot;&gt;aop&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;aspectj-autoproxy&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;searchindexAspect&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;com.mycoolcompany.app.search.IndexForSearchAspect&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;indexer service will be injected &lt;/span&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;--&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexAccessor&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;ref&lt;/span&gt; &lt;span style=&quot;color: rgb(39, 71, 150);&quot;&gt;local&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;indexAccessor&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I know, I&#39;ve missed a lot of details here, so this post is something like show-case, not cookbook :) Any opinions are welcome !&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6489958693109562236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/6489958693109562236' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6489958693109562236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6489958693109562236'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/03/search-with-spring-hibernate-lucene-and.html' title='Search with Spring Hibernate Lucene and Aspect Oriented Programming in action'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-453650015717754854</id><published>2008-02-24T12:41:00.000-08:00</published><updated>2008-02-24T13:34:19.104-08:00</updated><title type='text'>DBUnit Boolean issue</title><content type='html'>&lt;a href=&quot;http://www.dbunit.org/&quot;&gt;DBUnit&lt;/a&gt; is a nice procduct. In fact I&#39;m not using it directly. I&#39;m prefer going in declarative way with &lt;a href=&quot;http://mojo.codehaus.org/dbunit-maven-plugin/&quot;&gt;dbunit-maven-plugin&lt;/a&gt;. Why declarative way ? Well, all I need to do to populate database before executing JUnit test is to configure maven plugin and we are ready to go. The sweet thing is that data for storing in database is in xml format. XML is not SQL :) I&#39;ve tested my application without any changes in HSQLDB, MySQL and Oracle without single change in data for testing. I mean no RDBMS specific  SQL here, more to say, no SQL at all. Creation such datafile also is not a problem. DBUnit plugin can create it for you with the help of dbunit:export goal.&lt;br /&gt;&lt;br /&gt;All is seems to be okay whyle you are not trying to persist Boolean value. For the first look, all is going wrong. I&#39;ve spent a lot of time trying to understand WTF is going on. DBUnit does not insert boolean value, and says that column doesn&#39;t exist at all. It is damn fun when I know that column _exacly_ exists. Bug ? Feature ? /dev/hands error ? :)&lt;br /&gt;&lt;br /&gt;As Google reported, I was not alone with this problem. And it is more a feature than a bug. Solution is &lt;a href=&quot;http://issues.appfuse.org/browse/APF-101&quot;&gt;here&lt;/a&gt;. So, adding           &lt;datatypefactoryname&gt;${dbunit.hack.Boolean}&lt;/datatypefactoryname&gt;  to plugin&#39;s configuration section works ! At HSQLDB profile of my parent pom.xml I have dbunit.hack.Boolean=org.dbunit.ext.hsqldb.HsqldbDataTypeFactory.&lt;br /&gt;&lt;br /&gt;I&#39;m happy, but how many another small bugs/features are in software, which are ready to eat wery easy 1-2-3 hours of our life ?&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/453650015717754854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/453650015717754854' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/453650015717754854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/453650015717754854'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2008/02/dbunit-boolean-issue.html' title='DBUnit Boolean issue'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-954819527728242255</id><published>2007-12-04T02:17:00.000-08:00</published><updated>2007-12-04T05:59:31.458-08:00</updated><title type='text'>Tracing MyFaces with AspectJ, Tomcat and Maven 2</title><content type='html'>When I started to learn Spring, I faced with AOP. It&#39;s new and interesting for me. It&#39;s really not easy to understand a new concept and to do some refactoring of my own brain while the most of documentation and books are in English (not my native language). There is not (almost) problem  with English itself, but understanding a new concept is hard.&lt;br /&gt;&lt;br /&gt;AOP is powerfull. Really. Relocating cross-cutting concerns to aspects is nice idea. Since I can intercept the methods executions of my own classes, I became very interested in how to trace any third-party libraries. In fact it&#39;s pretty cool to be able to see internals of MyFaces, Hibernate or whatever in action to get a deeper understanding what is going on behind the scene...&lt;br /&gt;&lt;br /&gt;I found a wiki page about &lt;a href=&quot;http://wiki.apache.org/myfaces/TracingMyFacesUsingAspectJ&quot;&gt;tracing MyFaces with AspectJ&lt;/a&gt;. Many thanks to &lt;span title=&quot;193.243.207.122&quot;&gt;Cagatay Civici for this article, really helpful. It is a starting point for my experiments. I&#39;m using aspect source code from this article.&lt;br /&gt;&lt;br /&gt;My environment is the following : JDK 1.5, Maven 2, Tomcat 5, MyFaces, AspectJ 1.5. &lt;/span&gt;&lt;span title=&quot;193.243.207.122&quot;&gt;&lt;br /&gt;&lt;br /&gt;Cagatay restrict his article to &lt;/span&gt;statically compiled AspectJ. But as you&#39;ll see later, runtime weaving on JDK 1.5 is not so hard to implement.&lt;br /&gt;&lt;br /&gt;The first issue I came across is how to compile AspectJ aspect with Maven 2. Bingo ! There is a &lt;a href=&quot;http://mojo.codehaus.org/aspectj-maven-plugin/usage.html&quot;&gt;Maven plugin&lt;/a&gt;. So, placing some Trace.aj at src\main\java will work.&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.codehaus.mojo&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;aspectj-maven-plugin&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;outxml&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;true&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;outxml&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;executions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;compile&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;         &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;test-compile&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goal&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;goals&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;execution&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;executions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Please note, that outxml=true. It&#39;s important since it is flag to &quot;Generate aop.xml file for load-time weaving with default name.(/META-INF/aop.xml)&quot;.&lt;br /&gt;&lt;br /&gt;The final part of config is agent setup for Tomcat. &lt;a href=&quot;http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html&quot;&gt;According to docs&lt;/a&gt; it&#39;s should be started with one additional JVM argument - javaagent.&lt;br /&gt;&lt;br /&gt;Now we have tracing aspect, can compile it with Maven and know how to start Tomcat with right option. As for me, I like &lt;a href=&quot;http://cargo.codehaus.org/Maven2+plugin&quot;&gt;Cargo plugin&lt;/a&gt;. It is useful for integration testing for example, but in this case it is just a very nice Maven 2 plugin to put all together. With this config we can automatically download tomcat 5 distribution, unpack it, run tomcat with our -javaagent option&lt;br /&gt;and deploy war. A lot of work, huh ? :)&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.codehaus.cargo&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;cargo-maven2-plugin&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;container&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;containerId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;tomcat5x&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;containerId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;zipUrlInstaller&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;    http://www.eu.apache.org/dist&lt;br /&gt;    /tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip&lt;br /&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;installDir&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   ${java.io.tmpdir}/donloadedByCargo&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;installDir&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;zipUrlInstaller&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;output&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;       ${project.build.directory}&lt;br /&gt;   /tomcat5x.logs/container.log&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;output&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;append&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;false&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;append&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;       ${project.build.directory}&lt;br /&gt;     /tomcat5x.logs/cargo.log&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;container&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;standalone&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;home&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; ${project.build.directory}/tomcat5x&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;home&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.servlet.port&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     8080&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.servlet.port&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.jvmargs&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     -javaagent:&quot;${user.home}\.m2\repository&lt;br /&gt;     \aspectj\aspectjweaver\1.5.3\aspectjweaver-1.5.3.jar&quot;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.jvmargs&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.logging&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;high&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;cargo.logging&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;deployables&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;deployable&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;com.mycoolcompany.fun&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;MyFacesAspectJ&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;war&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;MyFacesAspectJ&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;deployable&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;deployables&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;configuration&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;plugin&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;As you can see, cargo.jvmargs element contains a path to  &lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;/span&gt;aspectjweaver-1.5.3.jar library, in my case it is in my local repository already. After all to see it in action just type &quot;mvn clean package cargo:start&quot; and you are ready to go !&lt;br /&gt;&lt;br /&gt;Trace will be available in the file &quot;C:\trace.out&quot; as defined in aspect source code. Exploring it&#39;s contents is another story, I guess.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/954819527728242255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/954819527728242255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/954819527728242255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/954819527728242255'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/12/tracing-myfaces-with-aspectj-tomcat-and.html' title='Tracing MyFaces with AspectJ, Tomcat and Maven 2'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-6085316133271952770</id><published>2007-11-14T01:26:00.000-08:00</published><updated>2007-11-14T02:22:50.258-08:00</updated><title type='text'>JSF : MyFaces and Sun RI profiles for Maven 2</title><content type='html'>I&#39;ve used MyFaces as implementation of JSF 1.1 specification. Why ? The main reason is great community and great support for Maven 2 - maven-archetype-myfaces for example, + Tomahawk.&lt;br /&gt;&lt;br /&gt;And now, I&#39;m interested in what is the difference between the two ? Any comments appreciated.&lt;br /&gt;&lt;br /&gt;Maven 2 is my friend here, since I can use profiles - one for JSF RI, another one for MyFaces. I guess it could be useful for someone else, so here is the code :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;profiles&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;profile&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsfri&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;activation&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsf&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;ri&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;activation&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.faces&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsf-api&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;1.1_02&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;java.servlet.servlet.jsp&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsp-api&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.servlet&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;servlet-api&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.servlet.jsp&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsp-api&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.servlet.jsp.jstl&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jstl&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.faces&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsf-impl&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;1.1_02&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;java.servlet.servlet.jsp&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsp-api&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.servlet&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;servlet-api&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.servlet.jsp&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsp-api&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.servlet.jsp.jstl&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jstl&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusion&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;exclusions&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;javax.servlet&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jstl&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;1.1.0&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;repositories&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;repository&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;java.net&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;java.net Maven 1 Repository&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;br /&gt; &lt;/span&gt;https://maven-repository.dev.java.net/nonav/repository&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&lt;br /&gt; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;layout&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;legacy&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;layout&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;repository&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;repositories&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;profile&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;profile&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;myfaces&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;activation&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;jsf&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;myfaces&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;activation&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.apache.myfaces.core&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;myfaces-api&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;1.1.6-SNAPSHOT&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;org.apache.myfaces.core&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;groupId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;myfaces-impl&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;artifactId&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;1.1.6-SNAPSHOT&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependency&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;&amp;lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;        &amp;lt;dependency&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;            &amp;lt;groupId&gt;org.apache.myfaces.tomahawk&amp;lt;/groupId&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;            &amp;lt;artifactId&gt;tomahawk&amp;lt;/artifactId&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;            &amp;lt;version&gt;1.1.6-SNAPSHOT&amp;lt;/version&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;        &amp;lt;/dependency&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;--&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;dependencies&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;repositories&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;repository&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;releases&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;enabled&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;false&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;enabled&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;releases&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;snapshots&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;apache-maven-snapshots&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; http://people.apache.org/repo/m2-snapshot-repository&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;repository&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;repositories&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;profile&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;profiles&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;To switch between profiles use &quot;mvn -Djsf=ri&quot; or &quot;mvn -Djsf=myfaces&quot;.&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/6085316133271952770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/6085316133271952770' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6085316133271952770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/6085316133271952770'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/11/jsf-myfaces-and-sun-ri-profiles-for.html' title='JSF : MyFaces and Sun RI profiles for Maven 2'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-4839491470702087821</id><published>2007-11-12T03:45:00.000-08:00</published><updated>2007-11-12T05:17:44.912-08:00</updated><title type='text'>JSF : hacking redirect and request scope managed bean</title><content type='html'>Strting with MyFaces project and Maven 2 is very easy :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn archetype:create&lt;br /&gt;-DarchetypeGroupId=org.apache.myfaces.maven&lt;br /&gt;-DarchetypeArtifactId=maven-archetype-myfaces&lt;br /&gt;-DarchetypeVersion=1.0-SNAPSHOT&lt;br /&gt;-DgroupId=com.mycoolcompany.web&lt;br /&gt;-DartifactId=jsfRedirect&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;When project is created, you can run web app (jetty is used here) :&lt;br /&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;mvn -U -PjettyConfig jetty:run&lt;br /&gt;&lt;/blockquote&gt;Now we have a skeleton of application. Let&#39;s try to understand how to deal with redirect.&lt;br /&gt;&lt;br /&gt;Let&#39;s check what happens when form is submitted. Current config is&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;navigation-case&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;from-outcome&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;success&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;from-outcome&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;to-view-id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;/page2.jsp&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;to-view-id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;navigation-case&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;First request :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;GET /jsfRedirect/helloWorld.jsf HTTP/1.1&lt;br /&gt;Accept: */*&lt;br /&gt;Accept-Language: ru&lt;br /&gt;Accept-Encoding: gzip, deflate&lt;br /&gt;User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.40903)&lt;br /&gt;Host: localhost:8080&lt;br /&gt;Connection: Keep-Alive&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Cookie: JSESSIONID=zm2pcktnv9vl&lt;br /&gt;&lt;/blockquote&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;Response : &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;  HTTP/1.1 200 OK&lt;br /&gt;Content-Type: text/html; charset=ISO-8859-5&lt;br /&gt;Content-Language: ru&lt;br /&gt;Content-Length: 7742&lt;br /&gt;Server: Jetty(6.1.6rc1)&lt;br /&gt;&lt;/blockquote&gt;There is nothing special here.&lt;br /&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;Form submit:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;POST /jsfRedirect/helloWorld.jsf HTTP/1.1&lt;br /&gt;Accept: */*&lt;br /&gt;Referer: http://localhost:8080/jsfRedirect/helloWorld.jsf&lt;br /&gt;Accept-Language: ru&lt;br /&gt;Content-Type: application/x-www-form-urlencoded&lt;br /&gt;Accept-Encoding: gzip, deflate&lt;br /&gt;User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.40903)&lt;br /&gt;Host: localhost:8080&lt;br /&gt;Content-Length: 3892&lt;br /&gt;Connection: Keep-Alive&lt;br /&gt;Cache-Control: no-cache&lt;br /&gt;Cookie: JSESSIONID=zm2pcktnv9vl&lt;/blockquote&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;Posted data is the following:&lt;/span&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;/p&gt;&lt;blockquote&gt;form:input1    testString&lt;br /&gt;form:button1    press me&lt;br /&gt;autoScroll    0,0&lt;br /&gt;form_SUBMIT    1&lt;br /&gt;form:_idcl&lt;br /&gt;form:_link_hidden_&lt;br /&gt;javax.faces.ViewState  ___very__loong__ &lt;/blockquote&gt;   &lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;___very__loong__ is really very long string and I don’t want to post it, you can check it by yourself if you want.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;  &lt;/p&gt;As we can see, our submitted value were sent as form:input1 POST parameter. Please notice that at helloWorld.jsp we have assigned id=&quot;form&quot; to h:form&lt;h:form&gt; and id=&quot;input1&quot; to &lt;h:inputtext&gt;h:inputText.&lt;br /&gt;&lt;br /&gt;I guess org.apache.myfaces.AUTO_SCROLL is responsible for autoScroll param value.&lt;br /&gt;To see it in action take a look &lt;a href=&quot;http://www.irian.at/myfaces/autoscroll.jsf&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Responce is:&lt;br /&gt;&lt;br /&gt;&lt;/h:inputtext&gt;&lt;/h:form&gt;&lt;blockquote&gt;HTTP/1.1 200 OK&lt;br /&gt;Content-Language: ru&lt;br /&gt;Content-Type: text/html; charset=ISO-8859-5&lt;br /&gt;Content-Length: 6781&lt;br /&gt;Server: Jetty(6.1.6rc1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;....&lt;/blockquote&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;And now let’s see what will change when redirect is used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;navigation-case&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;    &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;from-outcome&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;success&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;from-outcome&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;to-view-id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;/page2.jsp&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;to-view-id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;redirect&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;navigation-case&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;In this case form submission looks the same as before,  but response is different, as expected :&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;  &lt;/p&gt;&lt;blockquote&gt;HTTP/1.1 302 Found&lt;br /&gt;Location: http://localhost:8080/jsfRedirect/page2.jsf&lt;br /&gt;Content-Length: 0&lt;br /&gt;Server: Jetty(6.1.6rc1)&lt;br /&gt;&lt;/blockquote&gt;    &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;&quot;Location&quot; http header means redirect for browser i.e. GET request.&lt;o:p&gt;&lt;/o:p&gt; In this case the value of request scoped managed bean will be lost between requests &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;(POST ant then GET), since HTTP is a stateless protocol.&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;&quot; lang=&quot;EN-US&quot;&gt;How to avoid data loss ? Ohh.. it is a long story.&lt;o:p&gt;&lt;/o:p&gt; To save data between requests I need to save managed bean in session. I can get access to http session object using faces context:&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; HelloWorldBacking &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt; sendSessionHack&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;FacesContext facesContext &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;    FacesContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getCurrentInstance&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;Map session &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;     facesContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getExternalContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getSessionMap&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;session&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;put&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;myBackingBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;successSessionHack&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;Ok, but how to get this value back in view ? It is a long story...&lt;br /&gt;&lt;br /&gt;Maybe &quot;there is no one way to do it&quot;, but I see only one - PhaseListener.&lt;br /&gt;If you know any other, please give me a sign! Code listed below will act at RESTORE_VIEW phase and then check if there is a session param with name myBackingBean, and finally assign&lt;br /&gt;this value to managed bean via programmatically operations with JSF EL.&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;apache&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;myfaces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;blank&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;listener&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;faces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;PhaseListener&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;faces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;context&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;FacesContext&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;faces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;PhaseEvent&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;faces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;PhaseId&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;faces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;FactoryFinder&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;faces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;application&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Application&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;faces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;application&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;ApplicationFactory&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;faces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;el&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;ValueBinding&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; org&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;apache&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;myfaces&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;blank&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;HelloWorldBacking&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt; java&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;util&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 74, 67);&quot;&gt;Map&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; MyPhaseListener &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;implements&lt;/span&gt; PhaseListener&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; PhaseId getPhaseId&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;return&lt;/span&gt; PhaseId&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;RESTORE_VIEW&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; beforePhase&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;PhaseEvent e&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;FacesContext facesContext &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;  FacesContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getCurrentInstance&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;Map session &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;  facesContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getExternalContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getSessionMap&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;HelloWorldBacking backingBean &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;HelloWorldBacking&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;session&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;get&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;myBackingBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;backingBean&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;ApplicationFactory appFactory &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;ApplicationFactory&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt; FactoryFinder&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getFactory&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;FactoryFinder&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;APPLICATION_FACTORY&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;Application application &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;appFactory&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;getApplication&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;ValueBinding valueBinding &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;br /&gt;application&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;createValueBinding&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;#{helloWorldBacking}&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;valueBinding&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;setValue&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;facesContext&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;backingBean&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;session&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;remove&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;myBackingBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; afterPhase&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;PhaseEvent e&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(105, 105, 105);&quot;&gt;// don&#39;t care  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Not so trivial, isn&#39;t it? :)&lt;br /&gt;BTW, to enable custom phase listener you need to add this snip of code in faces config file, examples-config.xml in our case :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;lifecycle&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;phase-listener&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;org.apache.myfaces.blank.listener.MyPhaseListener&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;phase-listener&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;lifecycle&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/4839491470702087821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/4839491470702087821' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4839491470702087821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/4839491470702087821'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/11/jsf-hacking-redirect-and-request-scope.html' title='JSF : hacking redirect and request scope managed bean'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-1980130967170804013</id><published>2007-11-01T01:43:00.000-07:00</published><updated>2007-11-01T02:22:27.661-07:00</updated><title type='text'>JSF : Redirect to URL with param from navigation-case</title><content type='html'>I&#39;m evaluating JSF now. I have to admit that some of JSF ideas are pretty nice, but there are many non-intuitive things which make life hard. From another point of view, it is framework, with it&#39;s own rules of the game.&lt;br /&gt;&lt;br /&gt;From my little experience I could say that JSF doesn&#39;t like the way of passing params via GET. Of course it is possible, but I couldn&#39;t say it is trivial and easy as in Struts for example. So, here is some technical stuff.&lt;br /&gt;&lt;br /&gt;I need to to redirect from navigation-case to URL with param which is a property of a managed bean. It looks like this :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;navigation-rule&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;from-view-id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;/add.jsp&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;from-view-id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;navigation-case&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;from-outcome&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;added&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;from-outcome&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;to-view-id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;/view.jsf?myParam=#{myManagedBean.id}&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;to-view-id&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;redirect&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;/&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;navigation-case&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(95, 80, 53);&quot;&gt;navigation-rule&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 87, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;I&#39;ve tried to figure out how to do it, but had no success here. In fact I found solution, but it&#39;s more something like a hack than solution.&lt;br /&gt;So, I&#39;ve asked MyFaces mailing list. Many thanks to all the people who answered me.&lt;br /&gt;&lt;br /&gt;To keep the story short, &lt;a href=&quot;http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/urlParamNav/&quot;&gt;here is solution.&lt;/a&gt; Custom view and navigation handlers should be added to use managed bean property as url param in navigation-case.&lt;br /&gt;&lt;br /&gt;I think to myself... should I use core JSF or switch to Apache Orchestra, or JBoss Seam to make development with JSF less painful ? JSF is still young, 1.2 is the latest version of specification and frameworks that use JSF has many additional functionality. Who knows ?&lt;br /&gt;&lt;span id=&quot;_user_mario@ops.co.at&quot; style=&quot;color: rgb(121, 6, 25);&quot;&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/1980130967170804013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/1980130967170804013' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1980130967170804013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1980130967170804013'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/11/jsf-redirect-to-url-with-param-from.html' title='JSF : Redirect to URL with param from navigation-case'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-7155032802207925737</id><published>2007-09-21T07:09:00.000-07:00</published><updated>2007-09-21T07:35:09.187-07:00</updated><title type='text'>static final String[] is not final ?</title><content type='html'>Lets take final variable  and try to assign new value  to it.  Well , we &#39;ll have no luck here - &quot;cannot assign a value to final variable myVar&quot; yet at compilation stage.  But  having a deal with  final arrays  is something different.  Here is an example :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; FinalArray&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; array &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;b&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;c&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; main&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt; args&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;     array&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;aaa&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;println&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;array&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Output will be &quot;aaa&quot;. It is still not possible to do something like&lt;br /&gt;&lt;br /&gt;String[] some_array = {&quot;aaa&quot;, &quot;bbb&quot;,&quot;ccc&quot;};&lt;br /&gt;array = some_array;&lt;br /&gt;&lt;br /&gt;but possible per-element assigning new values to final array elements:&lt;br /&gt;&lt;pre style=&quot;background: rgb(255, 255, 255) none repeat scroll 0% 50%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;class&lt;/span&gt; FinalArray&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; array &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;b&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;c&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;void&lt;/span&gt; main&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt; args&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; some_array &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;aaa&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;bbb&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 230);&quot;&gt;&quot;ccc&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119);&quot;&gt;int&lt;/span&gt; i&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 140, 0);&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;i&lt;array&gt;&amp;lt;length&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;i&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;          array&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;i&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;=&lt;/span&gt; some_array&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;[&lt;/span&gt;i&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;      &lt;span style=&quot;color: rgb(128, 0, 0); font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;String&lt;/span&gt; element&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;:&lt;/span&gt; array&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;{&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;color: rgb(187, 121, 119); font-weight: bold;&quot;&gt;System&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;out&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;.&lt;/span&gt;println&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;(&lt;/span&gt;element&lt;span style=&quot;color: rgb(128, 128, 48);&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;;&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(128, 0, 128);&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/array&gt;&lt;/pre&gt;So, it is final, you say ?&lt;br /&gt;&lt;hints id=&quot;hah_hints&quot;&gt;&lt;/hints&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/7155032802207925737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/7155032802207925737' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7155032802207925737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/7155032802207925737'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/09/static-final-string-is-not-final.html' title='static final String[] is not final ?'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849561.post-1977764433580239222</id><published>2007-08-27T07:31:00.000-07:00</published><updated>2007-08-27T07:50:53.077-07:00</updated><title type='text'>Maven: The Definitive Guide (1.0 Alpha 2)</title><content type='html'>It seems to be that &lt;a href=&quot;http://www.sonatype.com/book/&quot;&gt;this is very nice book about Maven 2&lt;/a&gt;. Maybe it can help me to understand Maven 2 concepts even better. I&#39;d found link to this book at this &lt;a href=&quot;http://tapestryjava.blogspot.com/2007/08/maven-love-to-hate-or-hate-to-love.html&quot;&gt;blog&lt;/a&gt;. I&#39;m agree with author, Maven 2 is a really painful sometimes. Ant and Maven concepts are very different and a lot of time is needed to switch between them.&lt;br /&gt;&lt;hints id=&quot;hah_hints&quot;&gt;&lt;/hints&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;My IT World&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ostas.blogspot.com/feeds/1977764433580239222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34849561/1977764433580239222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1977764433580239222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849561/posts/default/1977764433580239222'/><link rel='alternate' type='text/html' href='http://ostas.blogspot.com/2007/08/maven-definitive-guide-10-alpha-2.html' title='Maven: The Definitive Guide (1.0 Alpha 2)'/><author><name>Stas Ostapenko</name><uri>http://www.blogger.com/profile/08055498414352998028</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt57VpdKAkA5p5s8e6yml7l9t9RGJybYJQ-LBvOqDxpUVJ3SW9m7Zw2Ud_mEAGkSQvL60AZaYt5TW2xjk7hXvVrlWSx3Z9HX5gpUO_LEs0V5HaRjxhapx7Gzz9SFf4Lg/s113/DSC02316-ava-short.jpg'/></author><thr:total>0</thr:total></entry></feed>