You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yacy_search_server/htroot/DemoServletRDF.java

47 lines
1.0 KiB

13 years ago
import net.yacy.cora.protocol.RequestHeader;
12 years ago
import net.yacy.server.serverObjects;
import net.yacy.server.serverSwitch;
13 years ago
public final class DemoServletRDF {
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header,
final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
13 years ago
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
13 years ago
// prop.put("temperature", "-10°C");
13 years ago
if (post != null) {
13 years ago
if (post.containsKey("submit")) {
prop.put("temperature", post.get("textthing"));
13 years ago
String filename= post.get("textthing");
13 years ago
// prop.put("imglink", filename+".jpg");
13 years ago
int counter = 0;
13 years ago
while (counter < 10) {
13 years ago
prop.put("localimg_"+counter+"_path","/"+filename);
13 years ago
prop.put("localimg_"+counter+"_checked", "2");
counter++;
}
13 years ago
prop.put("localimg", counter);
13 years ago
// prop.put("temperature",yacy.homedir+"/DATA/HTDOCS/"+filename);
}
13 years ago
}
13 years ago
// return rewrite properties
return prop;
}
}