[Mathlib-commitlog] SF.net SVN: mathlib:[843] JMathLib/trunk/src/jmathlib/ui/servlet/ JMathLibServl
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2009-02-11 22:45:46
|
Revision: 843
http://mathlib.svn.sourceforge.net/mathlib/?rev=843&view=rev
Author: st_mueller
Date: 2009-02-11 22:45:39 +0000 (Wed, 11 Feb 2009)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/servlet/JMathLibServlet.java
Modified: JMathLib/trunk/src/jmathlib/ui/servlet/JMathLibServlet.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/servlet/JMathLibServlet.java 2009-02-10 20:40:16 UTC (rev 842)
+++ JMathLib/trunk/src/jmathlib/ui/servlet/JMathLibServlet.java 2009-02-11 22:45:39 UTC (rev 843)
@@ -15,11 +15,7 @@
import jmathlib.core.interfaces.MathLibOutput;
import jmathlib.core.interpreter.*;
-/**
- *
- * @author stefan
- *
- */
+/** a basic servlet showing the usage of JMathLib */
public class JMathLibServlet extends HttpServlet implements MathLibOutput {
private String dispText ="";
@@ -47,18 +43,7 @@
// tree and not have any harmful side effects.
- //URL url = HelloWorldExample.class.getResourceAsStream("webFunctionsList.dat");
- InputStream in = JMathLibServlet.class.getResourceAsStream("webFunctionsList.dat");
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
-
- // read each line of the functions list
- String line = null;
- while ((line = br.readLine()) != null)
- {
- System.out.println("read =" + line);
- }
-
-
+ // open instance of JMathLib
Interpreter jml = new Interpreter(false);
jml.setOutputPanel(this);
@@ -70,10 +55,7 @@
jml.executeExpression("dir");
- //String c =
- //ClassLoader.getSystemResourceAsStream(name)
-
String s = jml.getString("a");
out.println("<pre>"+s+"</pre>");
@@ -89,6 +71,7 @@
}
/**
+ * catch text from jmathlib for later display
* @param text
*/
public void displayText(String text)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|