diff --git a/source/org/thdl/tib/scanner/OnLineScannerFilter.java b/source/org/thdl/tib/scanner/OnLineScannerFilter.java
index 7cf2556..ac1e474 100644
--- a/source/org/thdl/tib/scanner/OnLineScannerFilter.java
+++ b/source/org/thdl/tib/scanner/OnLineScannerFilter.java
@@ -40,26 +40,35 @@ public class OnLineScannerFilter extends HttpServlet
private final static String propertyFile = "dictionary";
private final static String dictNameProperty = "onlinescannerfilter.dict-file-name";
private final static String otherLinksProperty = "onlinescannerfilter.links-to-other-stuff";
+ private final static String clearStr = "Clear";
+ private final static String buttonStr = "button";
+ private final static String scriptStr = "script";
+ private final static String tibetanStr = "tibetan";
+
ResourceBundle rb;
private TibetanScanner scanner;
+ private String dictionaries[];
public OnLineScannerFilter() throws Exception
{
rb = ResourceBundle.getBundle(propertyFile);
scanner = new LocalTibetanScanner(rb.getString(dictNameProperty));
+ dictionaries = scanner.getDictionaryDescriptions();
}
- public void doGet(HttpServletRequest request,
+ synchronized public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
+ String answer, parrafo = null, checkboxName;
+
// if this line is included in the constructor, it works on the iris server but not on wyllie!
ThdlOptions.setUserPreference("thdl.rely.on.system.tmw.fonts", true);
ThdlOptions.setUserPreference("thdl.rely.on.system.tm.fonts", true);
response.setContentType("text/html");
PrintWriter out = response.getWriter();
- String parrafo = request.getParameter("parrafo"), checkboxName, script;
+
DictionarySource ds=null;
boolean checkedDicts[], allUnchecked, wantsTibetan, useTHDLBanner = (request.getParameter("thdlBanner")!=null);
// int percent=100;
@@ -85,12 +94,12 @@ public class OnLineScannerFilter extends HttpServlet
out.println(" ");
out.println(" ");
- script = request.getParameter("script");
+ answer = request.getParameter(scriptStr);
/* script==null || makes default tibetan
script!=null && makes default roman
*/
- wantsTibetan = (script==null || script.equals("tibetan"));
+ wantsTibetan = (answer==null || answer.equals(tibetanStr));
if (wantsTibetan)
{
out.println("