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