Ubiquitous and mobile web applications are typically very autonomous in nature, because they rely on additional information about the user’s context. In this paper we present a general context model for including context information into ubiquitous and mobile web applications. Our model is based on layers, which cover the path from context sources to the application level, including all intermediate filtering and context fusion. As an example, we present a context-aware calendar application built according to our context model.