When generating a URL to deploy the application on Tomcat, NetBeans
does not escape special characters, which causes Tomcat to mis-interpret them, thus causing deployment to fail.
Instead of default “C:\Documents and Settings\sanjith\Local Settings\Temp” directory location of deployment context.xml file, use simple location (without spaces or any special characters) like D:\temp.
Note: Changing of the windows environment variable “TEMP” will not help here!
Instead add the following in “netbeans.conf” file under the “etc” directory of netbean’s installation home directory to resolve this problem.