new 8.19:
jump to help for "bad magic number errors" !
got a jars top 25%

Having done a few web sites i found myself looking for a simple search solution. An applet seemed like the thing to do. you just put it on your page. no scripting, no cgi-bin, no fuss. However after looking far and wide, there was no simple searching applets to be found. so, with the guidance of Professor Rick Decker of the Computer Science Department at Hamilton, i made searchLite: a customizable single-word search engine applet.

 
 

Download

members.aol.com:
SearchLite.sea.hqx (49k)

  get 'em seperately: 
  SearchLite.class 
  searchingSpyder.class 
  PositionLayout.class 
  Hyperlink.class 

colossus.hamilton.edu:
SearchLite.sea.hqx (49k)

Version History

8.5.97 - 1.0 released.

Quick FAQ

last updated: 8.19.97

How do i use it on my web page?

All you have to do is download the .class files, put them in the same directory as the page running the applet, and put the applet tag in your page. thats it.

what happens after I hit search?

oh, that. it's detailed, but i'll tell you some of what the applet is doing.
when you press the search button, the applet launches a spyder which starts its crawling on the StartPage (see parameters below), if it sees any links which are in the same directory or below that root directory, it searches them too. The status bar shows how far the spyder is from being finished.

searchLite does not work. what's going on?

good question. i want to know the answer too.

It could be the java environment.
As much as anyone in the java world, i want to believe that "write once, run anywhere" is more then a nice marketing line. Unfortunately, the java VMs responsible for making java work on your browser or pc differ widely. I tested searchLite on as many VM as I could find. Version 1.0 is the one which ran on as many as possible without a hitch. It does not run perfectly on all VM's, so it could be the java environment.
Another thing you want to check are the the browser's applet security restrictions. The normal level of security should allow access to the applet's home domain, but sometimes paranoia gets the best of your browser and it wont let the applet connect back to its home domain. the spyder can't search a site if it cant get there.

It could be the HTML.
As web browsers have progressed, they have become a lot more forgiving of sloppy HTML. As searchLite grows older, it too will become more forgiving, but for now, it likes the HTML to be fairly clean. If your HTML chokes a browser, chances are that it will confuse the hell out of the spyder.

Or it could be one of those weird things that sometimes happens.
Let me know what kind of trouble is happening and let's see what we can do.

what is a "bad magic number?"

a magic number is something java has to annoy the hell out of people who use it. nobody really knows what it is, but it is commonly thought that one of the belevolent java wizards way back in '94 cast a spell to make java use widespread and make java programmers happy. Then without warning a wicked java witch cast another spell on ftp programs causing them to upoad the .class files as text. You can counter the evil spell by making sure you upload the .class files a binary data.
we are in the process of hunting down the wicked witch. i'm carrying the H20.
for a quick cure, try downloading the .class files seperately: 
SearchLite.class  searchingSpyder.class  PositionLayout.class  Hyperlink.class 

where are you going with this?

eventually, if enough people use the applet, i'll make searchLite 2.0. I already have some ideas, do you? searchLite has a yet-unnamed sister application which can do a lot more stuff without all of the applet security mumbo-jumbo. if you have some improvements to suggest, fire away.

so what are the parameters?

here is a list of the Parameters and what they do:

namedescription
SearchStartthis is the complete URL of the page used to begin the search. it does not have to be the same page that the applet is on, but (due to applet security restrictions) it does have to be in the same domain. use the full address of the page (http://www.whatever.com/more/page.html).

not optional

ServerDefaultthe server which hosts your web site usually has some sort of default name for directories when no name is specified. For for most people it is "index.html" or "default.html"

not optional

BackColorin order to have the applet blend in with the page, you can specify a background color by name (red) or hex (#FF00A1). If the parameter is not included, it will default to white. The colors of the applet above do not match the page to show the amont of screen real estate searchLite uses.

optional

StatusBarColorThis is the color of all of the labels and the status bar, in some VMs it is also the color of the start button. The status bar's background is this color, but it is about two shades darker. It's value falls under the same limits as BackColor, except it will default to green. Quick hint: avoid headaches by using different colors for the BackColor and StatusBarColor. Also, using a light color for the status bar is recommended

optional

XtraOptionsIf you wish to let the searcher choose their own options, this will put two checkboxes in the applet to specify whether the user wants to find exact matches and search other pages. if not specified, the defaults are to not find exact matches and to search all pages in your site.

optional

for example, the params from the applet above:

<APPLET CODE = "SearchLite.class" WIDTH =180 HEIGHT = 40>
<PARAM NAME=SearchStart VALUE="http://members.aol.com/tleen69203/holzphome.html">
<PARAM NAME=BackColor VALUE="#000011">
<PARAM NAME=StatusBarColor VALUE="#AAAAAA">
<PARAM NAME=ServerDefault VALUE="index.html">
<PARAM NAME=XtraOptions VALUE="false">
</APPLET>

H O M E |H O L Z P |M A R K S |J A V A |X T R A