What Is Single Directory Architecture For JSP or Serlet

Share and Enjoy !

In this post we will see how the structure and architecture gets created from Learner perspective. Initially the learner try to put every page and other resource in the same folder.This is very easy setup and easy to understand.

This approach is called single directory Architecture.

From image you can see all the resources are in the same folder. This structure is good when you are learning or you have a very small site to maintain. Web.xml is used to control many aspect in web directory. As this approach has not any directory as such so it is not required. This is required as a deployment descriptor.


  • Easy to work with
  • No need to configure
  • works fine when the project is simple and small in nature
  • Static Web application(very much unlikely) can work fine


  • Very tough to maintain when project becomes larger
  • It is not organized
  • It is not portable
  • No separation

I strongly suggest to start with this approach when learning JSP or servlet for the first time .

Share and Enjoy !

See also  Abstract Class Number in Java

Leave a Reply

Your email address will not be published. Required fields are marked *