Commit 9fbfb80d authored by Fabien Triolet's avatar Fabien Triolet
Browse files

a servlet can read a file from web now.

parent b2da72c5
/** /**
* $Id: CallImpl.java,v 1.2 2002-11-25 16:09:11 triolet Exp $ * $Id: CallImpl.java,v 1.3 2002-12-04 12:04:34 triolet Exp $
* *
* Transmorpher * Transmorpher
* *
...@@ -205,6 +205,9 @@ public abstract class CallImpl extends Observable implements Call { ...@@ -205,6 +205,9 @@ public abstract class CallImpl extends Observable implements Call {
String key = (String)e.nextElement(); String key = (String)e.nextElement();
String val = (String)getParameters().getParameter(key); String val = (String)getParameters().getParameter(key);
if (((getProcess().getTransmorpher().getMain())instanceof Servlet)&&(key.equals("file"))){ if (((getProcess().getTransmorpher().getMain())instanceof Servlet)&&(key.equals("file"))){
if (val.startsWith("http"))
file.writeln(4,"tmParameters.setParameter(\""+ key +"\",\""+ val +"\" );");
else
file.writeln(4,"tmParameters.setParameter(\""+ key +"\",root+\""+ val +"\" );"); file.writeln(4,"tmParameters.setParameter(\""+ key +"\",root+\""+ val +"\" );");
} }
else else
......
/** /**
* $Id: Servlet.java,v 1.6 2002-11-25 16:09:11 triolet Exp $ * $Id: Servlet.java,v 1.7 2002-12-04 12:04:34 triolet Exp $
* *
* Transmorpher * Transmorpher
* *
...@@ -180,6 +180,7 @@ public class Servlet extends MainProcess { ...@@ -180,6 +180,7 @@ public class Servlet extends MainProcess {
iFile.writeln(12,"}"); iFile.writeln(12,"}");
iFile.writeln(12,"else{"); iFile.writeln(12,"else{");
iFile.writeln(14,"test=false;"); iFile.writeln(14,"test=false;");
iFile.writeln(14,"break;");
iFile.writeln(12,"}"); iFile.writeln(12,"}");
iFile.writeln(10,"}"); iFile.writeln(10,"}");
iFile.writeln(10,"else{"); iFile.writeln(10,"else{");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment