Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The Servlet should at least implement both the doGet(HttpServletRequest, HttpServletResponse) and doPost(HttpServletRequest, HttpServletResponse).




Module servlets do not implement the full servlet specification.

  • Wildcard urls are not allowed either. A "*" is assumed in the "servlet-name": a servlet mapped with a name of "forms" would be called with urls: "form", "forms", "form/asdf", etc
  • Module servlets don't have access to a ServletContext. Calls to getServletContext() will throw.
  • Init parameters are not currently supported for module servlets until TRUNK-4673 is done


Starting with Platform 2.0.0, you may dynamically define a (real) servlet that does not have the limitations of OpenMRS Module Servlets. See an example of this in the Legacy UI module.

The limitation of this alternative approach is that it will fail if you add, remove, or upgrade any installed modules without restarting the entire OpenMRS web application.