My compile gives error
--- Update ---
javac Scoring.java
Scoring.java:37: error: '.' expected
import ScoringRequest;
^
Scoring.java:37: error: ';' expected
import ScoringRequest;
^
Scoring.java:38: error: class, interface, or enum expected
import ScoringResponse;
^
3 errors
package Scoring; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.StringWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import ScoringRequest; import ScoringResponse; @WebServlet( name="Scoring", displayName="Scoring Servlet", urlPatterns = {"/Scoring"}, loadOnStartup=1) public class Scoring extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { BufferedReader reader = null; BufferedWriter writer = null; ScoringRequest req = null; try { reader = new BufferedReader(new InputStreamReader( request.getInputStream())); StringBuffer xml = new StringBuffer(); String line = reader.readLine(); while (line != null) { xml.append(line); line = reader.readLine(); } req = new ScoringRequest(xml.toString(), null, null, null); ScoringResponse res = (new ScoringEngine()).score(req); writer = new BufferedWriter(new OutputStreamWriter( response.getOutputStream())); writer.write(res.toXML()); writer.flush(); } catch (Exception ex) { System.err.println(ex); ScoringResponse res = new ScoringResponse(req.getModelName(), req.getPmmlURL(), req.getCsvInputRows(), null); StringWriter errWriter = new StringWriter(); ex.printStackTrace(new PrintWriter(errWriter)); res.setErrorMessage(errWriter.toString()); // res.setErrorMessage(ex.getMessage()); writer = new BufferedWriter(new OutputStreamWriter( response.getOutputStream())); writer.write(res.toXML()); writer.flush(); } finally { try { if (reader != null) reader.close(); } catch (Exception ex) { } try { if (writer != null) writer.close(); } catch (Exception ex) { } } } }