I was preventing my application from cross site scripting defect. I have done the validation part for all the fields present in my application, but I don't know how to prevent this defect if someone injects the code in the url, please help me how to get rid of this defect. Eg: Script:
javascript:alert(document.cookie)
like if we inject the above code in the url we can get the username and the session id after logout.
Please suggest me the solution.