title: WAR on tomcat cannot find deploy.jar in jre
body: <p>I have deployed my application on Tomcat as a WAR file. At one point I am using URLEncoder from com.sun.deploy.net to encode HTTP GET parameters.</p>
  
  <pre><code>message = URLEncoder.encode(message);
  </code></pre>
  
  <p>This compiles just fine. But as soon as the deployed application tries to access this method I receive a </p>
  
  <pre><code>java.lang.ClassNotFoundException: com.sun.deploy.net.URLEncoder
  </code></pre>
  
  <p>Why is that? I understand that the URLEncoder class belongs to <code>deploy.jar</code> of the JRE since java 1.3 (I am using 1.7) but Tomcat doesn't seem to find it ...</p>
  
  <p>What do I have to do?</p>