The outset of this thesis was to develop a solution for collecting separately deployable web modules into one seamless web application, a portal. The case study is the District Health Information Software 2, a modular web application with a Java back-end. The task included collecting the modules, giving the module web pages a common look, creating a menu system for accessing the modules, and creating common web widgets used by all the modules. As part of the development process, the thesis looks at the various levels of modularization in the Java web application. Modularization can be applied to all levels of an application, from the innermost levels of code organization in methods, through classes and combinations of classes and interfaces, to system modules and complete applications. The thesis focuses on the impact of code organization and the use of Java language constructs in order to promote module flexibility, extensibility, reusability, testability, and forward compatibility. It also looks at how tools and frameworks affect the modularization of applications, and how the case study and developed solutions compare to high level service architectures.