title: Spring MVC and JAVA applet
body: <p>I am trying to create a Spring MVC project. I am also using Hibernate as ORM. I'm trying to put my applet.jar(wich I have used in several projects including a ASP.NET project) into my view. But every time I get the <code>ClassNotFoundException</code>. I tried many answers on stackoverflow but none have solved my issue. Since I'm new to Spring MVC, I'm wondering if I'm doing something wrong with the configuration. This is my project tree(image below)</p>
  
  <p><img src="https://i.stack.imgur.com/GO3AL.png" alt="Project tree"></p>
  
  <p>I've tried putting in two of my applets and have highlighted them. Now I'm putting these lines in my project:</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %&gt;
  
  &lt;%
      String contextRoot = request.getContextPath() + "/";
      String resourceRoot = contextRoot + "resource/";
  %&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h3&gt;Business Form&lt;/h3&gt;
  
  &lt;div id="wrapper"&gt;
      &lt;form:form  action="rest/businessSaloon" method="post"  commandName="businessSaloon" id="businessSaloon"&gt;
  
          // some form data
  
  
      &lt;/form:form&gt;
  
  &lt;/div&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  
   &lt;APPLET code="hr.niko.as.client.WorkstationApplet.class" 
          archive="&lt;%=contextRoot %&gt;resources/lib/WorkStationApplet460.jar"
          width=350 height=200&gt;
  &lt;/APPLET&gt;
  
   &lt;APPLET code="hr.niko.as.client.WorkstationApplet.class" 
          archive="&lt;%=contextRoot %&gt;resources/lib/WorkStationApplet460.jar"
          width=350 height=250&gt;
  &lt;/APPLET&gt;
  
   &lt;APPLET code="hr.niko.as.client.WorkstationApplet.class" 
          archive="&lt;%=contextRoot %&gt;resources/lib/WorkStationApplet807.jar"
          width=350 height=200&gt;
  &lt;/APPLET&gt;
  
   &lt;APPLET code="hr.niko.as.client.WorkstationApplet.class" 
          archive="&lt;%=contextRoot %&gt;resources/lib/WorkStationApplet807.jar"
          width=350 height=250&gt;
  &lt;/APPLET&gt;
  </code></pre>
  
  <p>I've tried many ways but I get this error:</p>
  
  <pre><code>cache: Initialize resource manager: com.sun.deploy.cache.ResourceProviderImpl@9220cb basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@1a60b26 basic: Plugin2ClassLoader.addURL parent called for http://localhost:8080/SpringMVCExample2/rest/businessSaloon/WorkStationApplet460.jar network: Cache entry not found [url: http://localhost:8080/SpringMVCExample2/rest/businessSaloon/WorkStationApplet460.jar, version: null]
  </code></pre>
  
  <p>Do I have to add the applet into the web.xml as a servlet with path description? If yes, how do I do that? </p>
  
  <p>I appreciate any help!</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:
  Here is the complete error again with all four applet insertion attempts.</p>
  
  <pre><code>basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@30b878
  basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@1beb87c
  basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@105e45c
  basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@bc7c8e
  basic: Plugin2ClassLoader.addURL parent called for http://localhost:8080/SpringMVCExample2/rest/businessSaloon/WorkStationApplet807.jar
  basic: Plugin2ClassLoader.addURL parent called for http://localhost:8080/SpringMVCExample2/WorkStationApplet807.jar
  basic: Plugin2ClassLoader.addURL parent called for http://localhost:8080/SpringMVCExample2/rest/businessSaloon/WorkStationApplet460.jar
  basic: Plugin2ClassLoader.addURL parent called for http://localhost:8080/SpringMVCExample2/WorkStationApplet460.jar
  network: Cache entry not found [url: http://localhost:8080/SpringMVCExample2/WorkStationApplet460.jar, version: null]
  network: Cache entry not found [url: http://localhost:8080/SpringMVCExample2/rest/businessSaloon/WorkStationApplet460.jar, version: null]
  network: Cache entry not found [url: http://localhost:8080/SpringMVCExample2/rest/businessSaloon/WorkStationApplet807.jar, version: null]
  network: Cache entry not found [url: http://localhost:8080/SpringMVCExample2/WorkStationApplet807.jar, version: null]
  </code></pre>
  
  <p>EDIT 2:
  My path dispatcher path is here: </p>
  
  <pre><code>&lt;servlet&gt; 
  &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt; 
  &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-clas‌​s&gt; &lt;init-param&gt; 
  &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt;/WEB-INF/spring/appServlet/servlet-context.xml&lt;/param-value&gt; &lt;/init-param&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; 
  &lt;servlet-mapping&gt; 
  &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt; 
  &lt;url-pattern&gt;/&lt;/url-pattern&gt; 
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>EDIT 3:
  Here is my configuration file</p>
  
  <pre><code>package com.wargog.as;
  
  import org.springframework.context.annotation.Configuration;
  import org.springframework.web.servlet.config.annotation.EnableWebMvc;
  import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
  import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
  
  @Configuration
  @EnableWebMvc
  public class MvcConfiguration extends WebMvcConfigurerAdapter{
  
      @Override
      public void addResourceHandlers(ResourceHandlerRegistry registry) {
          registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
      }
  
  
  }
  </code></pre>