Java Filter public void run() { try { Tag tag; Object obj; while ((obj = in.read()) != null) { Token token = (Token) obj; if (token.getType() == Token.TT_TAG) { tag = token.createTag(); if (removingJava && tag.is("/applet")) { removingJava = false; continue; } if (tag.is("applet")) removingJava = true; if (!removingJava) { token.importTag(tag); out.write(token); } } else if (!removingJava) out.write(token); } out.close(); } catch (Exception e) {} }