Options

Initializing RM in Servlet

AlSemei88AlSemei88 Member Posts: 2 Contributor I
edited November 2018 in Help
I am developing web-app and i need to integrate RM to my app. I wanna initialize RM in my servlets Get method. But i have problem. Could not recognize command line as a Execution Mode.
 
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
response.setContentType("text/html");
RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE); ----> Here the problem
        RapidMiner.init();
        Process process=new Process(readFileAsString(x));
        PrintWriter out = response.getWriter();
        out.println("Hello");
     
}
Tagged:

Answers

  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,995 RM Engineering
    Hi,

    use
    RapidMiner.setExecutionMode(ExecutionMode.APPSERVER);
    Regards,
    Marco
  • Options
    AlSemei88AlSemei88 Member Posts: 2 Contributor I
    Thanks for reply. Still not working. I am using Eclipse and its not recognizing RapidMiner.setExecutionMode(ExecutionMode.APPSERVER); --> not recognize, gives error.
    i have rapidminer.jar in my eclipse library, i cant understand the problem.
    I have tried COMMANDLINE, GUI and others, but not working. I think something wrong with lib, but
    dont know what... Anybody have ready code for running rapidminer from servlet(web app). Really appreciate,
    stuck with these problem for 2 days..
  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,995 RM Engineering
    Hi,

    you are missing libraries then (In this specific case, launcher.jar). I don't know which libraries exactly are needed to run RM, however I suggest you start by just copying all .jar files from the RapidMiner lib folder. That way, you're sure to not miss out on one ;) You may try which ones you really need later on.

    Regards,
    Marco
Sign In or Register to comment.