1. A server, comprising: a computer comprising at least a memory and a processor and further comprising programmable instructions stored in the memory and operating on the processor, the instructions adapted to implement a servlet Application Programming Interface (API) for Extensible Messaging and Presence Protocol (XMPP) and executing on a virtual machine for servicing an XMPP entity; and an XMPP servlet container supporting the servlet API for XMPP for handling network transport, streams and stanzas specific to the XMPP entity; wherein the API provides a mechanism that allows messages to be correlated to specify how containers associate application data with subsequent messages processed in an application instance; wherein the XMPP servlet container further comprises: a network point at a transport layer for listening, routing and managing network connections with the XMPP entity; an XMPP service layer for managing XMPP sessions and streams with the XMPP entity via the network point; an application layer for managing XMPP stanzas with the XMPP entity via the XMPP service layer; and an application router to select an XMPP servlet application; wherein the application router services an initial request; and wherein the initial request contains an attribute and the application router selects an appropriate application based on the value of the attribute.