I had a question when to use encodeURL & when not to in case we are referring to images (in servlet code) which are residing on a dedicated(caching) server separate from the web/app server. What I read in an article recently is we should be using encodeURL with fully-qualified URL's to reference images outside your web server only if they are not accessible to the client directly (say the caching server is firewall protected). But do not use encodeURL on the URL if the client can browse to the resource directly.
I did not get this one correctly. Can someone ellaborate how this impacts from servlet development point of view.
Correct me if I am wrong here if the dedicated server is accessible directly to the client is it that the load on the web server rendering the servlet is less & image is rendered to the client browser as a separate resource.