Discussions

Web tier: servlets, JSP, Web frameworks: How to get the complete URL of the Servlet Context

  1. Hi

    How can I get the complete URL of the Servlet Context. I mean if I deploy the EAR file in /webapp/ how can I get http://server:port/webapp/.

    Regards,

    Néstor Boscán
  2. How about HttpServletRequest's getRequestURL() method?
  3. The context path[ Go to top ]

    Hi

    Thanks for the reply. I'm looking for the context path not the absolute path of the file.

    Regards,

    Néstor Boscán