Finally after a big battle I shouldn’t say it as a Battle got to say it was a War. I was able to run a web application done in struts framework, and based on my success story I’m just putting forth my views as to how to run the struts based web application.
(1) Nothing can teach as a documentation which is bundled along with the product, so what I did was I went through the docs provided by the Apache Tomcat and figured out as to how to configure / write context.xml files, first comes first.
You need to allow your web application to connect to your Database (MySQl / MS SQL / HSQL / DB2 / Oracle or x..y..z..) by means of DataSource interface of the JNDI which can be achieved by DBCP (DataBase Connection Pooling).
Download the Read Me File for configuring / writing the Context.xml file.
(2) Struts Libraries, mostly to avoid the incompatibility always go for a stable version I prefer 1.1 or 1.2.9 do not go for any other versions, always remember that your Web Application should be a plugin pattern, so create a folder ‘ lib‘ inside your web application and put all the dependent libraries for the web application in that folder also put your entire ‘lib ‘ of struts distribution inside that framework this solves most of the problems.
(3) Always write Ant Scripts for your web application which will make life simple for compiling java files of your web application.