mardi 24 février 2015

Spring MVC and JAVA applet

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 ClassNotFoundException. 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)


Project tree


I've tried putting in two of my applets and have highlighted them. Now I'm putting these lines in my project:



<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="form" uri="http://ift.tt/IED0jK" %>

<%
String contextRoot = request.getContextPath() + "/";
String resourceRoot = contextRoot + "resource/";
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h3>Business Form</h3>

<div id="wrapper">
<form:form action="rest/businessSaloon" method="post" commandName="businessSaloon" id="businessSaloon">

// some form data


</form:form>

</div>


</body>
</html>

<APPLET code="hr.niko.as.client.WorkstationApplet.class"
archive="WorkStationApplet460.jar"
width=350 height=200>
</APPLET>

<APPLET code="hr.niko.as.client.WorkstationApplet.class"
archive="<%=contextRoot %>WorkStationApplet460.jar"
width=350 height=250>
</APPLET>

<APPLET code="hr.niko.as.client.WorkstationApplet.class"
archive="WorkStationApplet807.jar"
width=350 height=200>
</APPLET>

<APPLET code="hr.niko.as.client.WorkstationApplet.class"
archive="<%=contextRoot %>WorkStationApplet807.jar"
width=350 height=250>
</APPLET>


I've tried many ways but I get this error:



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]


Do I have to add the applet into the web.xml as a servlet with path description? If yes, how do I do that?


I appreciate any help!


Thanks!


EDIT: Here is the complete error again with all four applet insertion attempts.



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]

Aucun commentaire:

Enregistrer un commentaire