The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

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

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    use
    RapidMiner.setExecutionMode(ExecutionMode.APPSERVER);
    Regards,
    Marco
  • 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..
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 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.