hi, i have a simple two file webapp where i pass two strings to a jsp page for processing. however when i run the app, i get 'resource not found error'. cant figure out what's the problem... some help will be much appreciated.. i got two files. index.jsp which launches train.jsp
index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Kivox Test</h1>
<p> </p>
<form name="form1" method="post" action="train.jsp">
<p>Select Audio File:
<input type="text" name="audio" id="audio">
<label>
<input type="submit" name="Browsebutton" id="Browsebutton" value="...">
</label>
</p>
<p>
Enter name of model to generate:
<input type="text" name="model" id="model">
</p>
<p> </p>
</form>
<p>
<label>
<input type="submit" name="Generate" id="Generate" value="Generate Model">
</label>
</p>
</body>
</html>
train.jsp
<%@page import="java.util.*" %>
<%@page import="java.io.*" %>
<%@page import="es.agnitio.common.AgnitioWarning" %>
<%@page import="es.agnitio.engine.AudioProxy" %>
<%@page import="es.agnitio.kivoxVerifier.KivoxEngine" %>
<%@page import="es.agnitio.kivoxVerifier.KivoxException"%>
<%@page import="es.agnitio.kivoxVerifier.KivoxFactory" %>
<%
String aud = request.getParameter("audio");
String mod = request.getParameter("model");
try {
KivoxEngine engine = KivoxFactory.getKivoxEngine();
AudioProxy audio = KivoxFactory.getProxyFactory().createAudioProxy(aud);
List<AgnitioWarning> warnings = new LinkedList<AgnitioWarning>();
engine.train(audio, mod, warnings);
for (AgnitioWarning warning : warnings) {
System.out.println("Received warning: " + warning.getMessage());
}
%>
<%= System.out.print("Model:"+mod+" generated successfully!") %>
<%} catch (KivoxException e) {
e.printStackTrace();
}
}
%>