Header Ads

  • Breaking Now

    What is the difference in between encodeRedirectURL and encodeURL?

    encodeURL is used for all URLs in a servlet's output. It helps session ids to be encoded with the URL. Moreover it rewrites URLs relative to the current document.if the url is not starting with 'http//.' and encodes any parameters added with the request.addQueryParameter or request.addURLParameter methods.

    As per Servlet API the encodeRedirectURL must ALWAYS be used within response.sendRedirect() commands.It is used for encoding session ids with URL but only while redirecting.

    No comments

    Post Top Ad

    Post Bottom Ad