Thanks for the reply, but I'm not so understand about the reply, can you explain more details?
In my jsp, I'm using out.println to print out the file url for user to click and download. The following is my code in jsp:
out.println("<a href=servlet/download.downloadServlet?attachmentId=" +getAttachId() + "&filename="+URLEncoder.encode(getFName())+">" + getFName() + "</a>");
Tried to use response.encodeURL too, but i still have the same error..
String encodedurl = "servlet/download.downloadServlet?attachmentId=" +getAttachId() + "&filename="+getFName());
out.println("<a href="+response.encodeURL(encodedurl)+">"+ getFName() + "</a>");
Anything that i have missed out???