From f6cfb97b7fb3fc9bfc0df00ea6fc5fe1343b46c4 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sat, 19 Jan 2008 01:07:52 +0000 Subject: [PATCH] added a test servlet (to be used to analyse the remote crawl xml bug) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4344 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/test.java | 21 +++++++++++++++++++++ htroot/test.xml | 9 +++++++++ 2 files changed, 30 insertions(+) create mode 100644 htroot/test.java create mode 100644 htroot/test.xml diff --git a/htroot/test.java b/htroot/test.java new file mode 100644 index 000000000..e1c79e552 --- /dev/null +++ b/htroot/test.java @@ -0,0 +1,21 @@ +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; + } + +} diff --git a/htroot/test.xml b/htroot/test.xml new file mode 100644 index 000000000..0e150fc4c --- /dev/null +++ b/htroot/test.xml @@ -0,0 +1,9 @@ + + + +#{item}# + +#[text]# + +#{/item}# +