Initializing RM in Servlet

AlSemei88
AlSemei88 New Altair Community Member
edited November 2024 in Community Q&A
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");
     
}

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    use
    RapidMiner.setExecutionMode(ExecutionMode.APPSERVER);
    Regards,
    Marco
  • AlSemei88
    AlSemei88 New Altair Community Member
    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..
  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    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

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.