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
This commit is contained in:
orbiter 2008-01-19 01:07:52 +00:00
parent f4e9ff6ce9
commit f6cfb97b7f
2 changed files with 30 additions and 0 deletions

21
htroot/test.java Normal file
View File

@ -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;
}
}

9
htroot/test.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<root>
#{item}#
<item>
<text>#[text]#</text>
</item>
#{/item}#
</root>