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.
22 lines
615 B
22 lines
615 B
17 years ago
|
import de.anomic.http.httpHeader;
|
||
|
import de.anomic.server.serverObjects;
|
||
|
import de.anomic.server.serverSwitch;
|
||
|
|
||
|
public class test {
|
||
|
|
||
|
// http://localhost:8080/test.xml?count=10
|
||
|
|
||
|
public static serverObjects respond(httpHeader header, serverObjects post, serverSwitch env) {
|
||
|
serverObjects prop = new serverObjects();
|
||
|
int count = Math.min(1000, (post == null) ? 0 : post.getInt("count", 0));
|
||
|
|
||
|
for (int i = 0; i < count; i++) {
|
||
|
prop.put("item_" + i + "_text", Integer.toString(i));
|
||
|
}
|
||
|
prop.put("item", count);
|
||
|
|
||
|
return prop;
|
||
|
}
|
||
|
|
||
|
}
|