When you deploy your application into servlet container, your URLs may be prefixed by the context path identifying your application among other applications in that container (i.e. /ReceiveMessagesServlet
becomes /MyApp/ReceiveMessagesServlet
).
Therefore you should take that possibility into account and modify your URLs accordingly, for example, with JSTL's
:
Alternatively, without JSTL: