I would like to know. How one should decide when to use an application server for his application. for e.g. I have an application based on struts + business classes (normal java classes) talking to DB. Would it be fruitfull to use Application server for this or web server would suffice.
You're using the term 'application server' the way I prefer to use it, to indicate componentry that is not tied to the web interface. You may find others use it to mean any platform running application code, as opposed to "out of the box" Apache or some web server. The latter would surely include servlets and JSPs. So let's go with your usage for now ...
It's a fairly common question up in the EJB forum - when to use EJBs? EJB components have a number of attributes: distributed, secure, transactional, component model, transparent persistence and more. Would the automated management of these areas meet your requirements in productivity, scalability, performance, etc? Sorry to say the answer is all up to you. You'll have to weigh the learning curve and deployment complexity against the benefits for your project and skills.
Did you have other "application server" candidates in mind besides an EJB container? You could of course throw your own from scratch. That would be great geek fun but probably not cost effective.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi