Wednesday, October 9, 2013

Configuring Apache Tiles to Avoid Caching During Development

When you want to use Apache Tiles, you will find that your tiles are cached and are not refershed when you reload the page in web browser.

This is a non-issue in production environment because once your webapp is deployed in production you never change your Apache Tiles templates and pages. However, in a development environment this is cumbersome since you will have to redeploy your webapp each time you make a change in your templates.

I faced a similar problem recently and the I found out the I could use the 'useMutableTilesContainer' property in TilesConfigurer class and the 'cache' property in TilesViewResolver class.

You configuration should look something like this:

       <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
          <property name="definitions">
          <property name="useMutableTilesContainer" value="true" />

<bean id="viewResolver" class="org.springframework.web.servlet.view.tiles3.TilesViewResolver">
      <property name="viewClass">
      <property name="cache" value="false" />

I hope that this helps somebody facing caching problem in Apache Tiles during development.

Basically you have to set 'useMutableTilesContainer' to true and the 'cache' property to false.

The 'useMutableTilesContainer' property is in TilesConfigurer class and the 'cache' property is in TilesViewResolver class.

Happy Coding!

Sunday, July 21, 2013

Dependencies Included!

Consider this:

What good is a phone without its battery? When we buy phones or any electronic that runs on a battery we expect batteries included with the product. 

As software developers, we face the same problem when we write Java application. We want to include dependencies with our final build. We build our project using Maven but our build won't run if we didn't to define dependencies paths for the runtime.

Maven can resolve dependencies while compiling/building the project for you but the final build in itself can't resolve dependencies unless you specify where the referenced classes are located. Here is how we typically define dependencies for the runtime:

java -cp MyProject.jar:MyCommonLibrary.jar:AnotherDependency.jar com.kondra.myproject.MainClass    

This is fine when you have a few dependencies. But that's never the case for software we write at Kondra. Most of the times we have 20 or 25 different dependencies and this means this command line will only get bigger and hard to maintain.

Luckily, there is a better solution! There is a Maven way of resolving this problem.
Recently, I had to write a script that could fetch information about Billboards Members from eBay and update our database. So I looked up for a solution to resolve this problem. I found a Maven solution to this problem. It is easy to use and can suit many use cases.
All you need to do is include this Maven configuration to your project:


The sample maven configuration is from a pom file of membersUpdater Jar project. It has a MembersUpdater class which is defined as a mainClass in the configuration above. A main class is that class of your project that has a main(String[]) method. The Maven plugin used here is maven-assembly-plugin and can be included in your project using:


I hope you find this useful and will use this time-saving feature of Maven whenever a need arises.

Sunday, September 23, 2012

What I've been up to!

I've not posted any post for quite sometime now. However, that is about to change. I'm writing apps with JavaScript now and I'm learning new stuff almost daily. I'm currently using RequireJS, AngularJS, Backbone, jQuery and NodeJS to build webapps at my work for our clients. This means my blog will now focus on these technologies a lot. I will try to share my learnings with you all. Thanks for leaving comments on my blog. I hope to continue writing stuff that software developers around the world find helpful.

Thursday, July 15, 2010

Installing ColdFusion 9.0.1 Update

Some people might face a problem when installing ColdFusion update on their Windows 2008 Server. This is because they will have to remove ColdFusion 9 connector settings and IIS6 Metabase Compatability from IIS 7.

So, here is what you need to do to update your CF 9:

  1. Remove existing ColdFusion connectors from IIS 7.
  2. Shutdown ColdFusion services
  3. Run the installer (downloaded in step one)
    You'll note that after installation you'll get a message like this one:
    Congratulations. Adobe ColdFusion 9.0.1 has been successfully installed to:


    Press Done to quit the installer.


    Solr Server has been upgraded. Reindex all the collections.

    Connector has been upgraded. If you use IIS 6 Management Compatibility, to use IIS 7 support, unconfigure (already configured) websites.
    Then uncheck all IIS 6 Management Compatibility options (Start > Control Panel > Programs > Programs and Features > Turn Windows features on or off > Internet Information Services > Web Management Tools) and then reconfigure all your configured websites using wsconfig tool. Ensure that unconfiguring of the websites is done before you disable IIS 6 Mangement Compatibility options.

    Note that this step is not mandatory. You have the option to continue using IIS 6 Management Compatibility.
  4. Start 'Server Manager' from Control Panel/Administrative Tools
  5. Scroll to 'Roles Summary' and Click on Web Server (IIS). (shown below)
  6. You will see a screen similar to the one below. The image below shows three sections: Events, System Services and Role Services.
  7. Since we have to remove specific services from Web Server (IIS) - click on 'Remove Role Services'
  8. You will see a window like the one below. Uncheck, IIS 6 Metabase Compatability and IIS 6 Management Console.
  9. When you uncheck, you might see a message saying that there are dependent services. Don't bother if it talks about IIS6 related services. Simple click 'Remove Dependent Role Services'. See below:
  10. Go ahead and finish the removal process.
  11. When the feature is removed, you will get confirmation (may get an error - just ignore). You will be asked to restart your windows server - click yes.
  12. Once your server completes the reboot, run the WSConfig.exe under Start menu > Adobe ColdFusion 9.
  13. Click 'Add' - a pop up window will appear that looks like the one below:
  14. Select the Configure web server for ColdFusion applications option, and click OK.
  15. Click ok.
  16. Now restart your IIS7 and you're done.

I hope this helps. If you face any issues, let me know.

Wednesday, July 14, 2010

ColdFusion 9.0.1 Update Now Available

Adobe released update for ColdFusion 9 yesterday. I have installed the update on my server running Windows Server 2008 with IIS 7.

This update now supports running ColdFusion with IIS7 without installing IIS6 Metabase Compatibility. Finally! IIS7 is almost 4 years old!

Download the update from:

Note: If you are running IIS7 with IIS6 Metabase Compatibility, then you'll have to remove IIS6 MC and that will require a restart of the server.

This update is recommended as it includes many bug-fixes and security hot-fixes.

Wednesday, January 27, 2010

ColdFusion Manual Configuration & Issues with TCP ports 51011, 51010 and 51800 on IIS and Apache

ColdFusion works by configuring your web server (IIS, or Apache) to execute files with known extensions (.cfm, .cfml, .cfc et al) to run as script. And for doing that ColdFusion comes with a small and important tool called “wsconfig”.

Problem: At times, regardless of operating system and the web server you are using, the ColdFusion installation will fail to configure web-server due to your network settings or firewall/security settings. When running wsconfig tool, you may encounter errors similar to the following:

  • Could not connect to any JRun/ColdFusion servers on host localhost.
    • Possible causes:
      • Server not running
        - Start Macromedia JRun4 or ColdFusion server
      • Server running
        - JNDI listen port in blocked by TCP/IP filtering or firewall on server
        - host restriction in blocking communication with server


Snapshot above shows one of the common scenario when wsconfig will not configure IIS.

Solution: Here is one fail proof solution to complete the installation of ColdFusion and stop worrying about getting wsconfig to… “run”. Yes, you we will not run “wsconfig”. Instead, we will manually configure web-servers and manually create files that are created by wsconfig.

Tuesday, December 1, 2009

Introducing WordArt for ColdFusion

wordart WordArt for ColdFusion is available for free under new BSD License.

WordArt CFC generates image for insertion of typography on a webpage by converting text to image in various styles. There are over 25 different options available in this first release of WordArt.

typography for web

☛ Quick Links

♥ Recommended For You