Friday, October 14, 2011

301 non-www to www

Hi All,

Normally in seo domain two domain names should not go to the same website.

Even with out http://www.example.com and http://example.com will also take as the 2 domain names.

We have to give 301 redirection to the particular domain in apache itself.

I think the following code will help you to do the thing in ubuntu.

$ sudo a2enmod rewrite

then in apache conf add the following lines



Now restart it and check

$ sudo service apache2 restart

{"Thanks"="Ramanavel Selvaraju"}

Friday, September 16, 2011

Struts2 + Tiles + Maven INtegration

Hi All,

Here we can see how to configure tiles with the new Struts2 Maven project. For struts2-tiles-plugin we have to add the following dependencies.



After that we can go for web.xml configuration. We have to add the tiles context loader and a tiles listener and use the following filter,


In you struts.xml create a type for tiles,



create an xml file named tiles.xml which u have mentioned in web.xml

Thats it create the files according to tiles.xml.

Then clean the target dir and give mvn install in online mode.

Then start the server, Enjoy..