regarding encodeURL


EJB programming & troubleshooting: regarding encodeURL

  1. regarding encodeURL (1 messages)

    Hi pls explain me about encodeURL method and servletContecxt String contextPath = request.getContextPath(); String encodedUrl = response.encodeURL(contextPath + "/default.jsp");

    Threaded Messages (1)

  2. Re: regarding encodeURL[ Go to top ]

    encodeURL public java.lang.String encodeURL(java.lang.String url) Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. The implementation of this method includes the logic to determine whether the session ID needs to be encoded in the URL. For example, if the browser supports cookies, or session tracking is turned off, URL encoding is unnecessary. For robust session tracking, all URLs emitted by a servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies. Parameters: url - the url to be encoded. Returns: the encoded URL if encoding is needed; the unchanged URL otherwise. hope it will help you, cheers,