Fixed a bug with regards to the word order in the servlet version.

This commit is contained in:
amontano 2003-09-09 16:02:03 +00:00
parent 1467f9cd3f
commit cc853be387

View file

@ -48,7 +48,7 @@ public class RemoteScannerFilter extends GenericServlet
{ {
BufferedReader br; BufferedReader br;
res.setContentType ("text/plain"); res.setContentType ("text/plain");
SimplifiedLinkedList words; Token token[];
Word word; Word word;
PrintWriter out = res.getWriter(); PrintWriter out = res.getWriter();
int i; int i;
@ -84,16 +84,12 @@ public class RemoteScannerFilter extends GenericServlet
br.close(); br.close();
scanner.finishUp(); scanner.finishUp();
words = scanner.getTokenLinkedList(); token = scanner.getTokenArray();
Token token;
SimplifiedListIterator li = words.listIterator(); for (i=0; i<token.length; i++)
while (li.hasNext())
{ {
token = (Token)li.next(); if (!(token[i] instanceof Word)) continue;
if (!(token instanceof Word)) continue; word = (Word) token[i];
word = (Word) token;
out.println(word.getWylie()); out.println(word.getWylie());
out.println(word.getDef()); out.println(word.getDef());
out.println(); out.println();