Q:

How to use Rserve with JSP on Tomcat? (Windows 7)

I am trying to write a web page using JSP which can talk to R via Rserve.
I have installed R and Rserve and both are running (I have checked in task manager).
What I need to to do now is make a connection between the two. I have found examples of JAVA but not JSP. I have tried editing the JAVA code to be used as JSP but that always gives me errors relating to this bit of code:
        try {
        RConnection c = new RConnection();
        double d[] = c.eval("rnorm(10)").asDoubles();
        org.rosuda.REngine.REXP x0 = c.eval("R.version.string");
        System.out.println(x0.asString());
    } catch (REngineException e) {

    }

I have been using the code from the answer on this question.
I am new to both JAVA and R so I am probably missing something really simple...

A:

Here this might help you out :)
http://www.studytrails.com/R/RServe/RServe-Java-First-Program.jsp

