Fixing Stuff

 

Over the years, stuff has broken on my website. I used to be pretty good about fixing broken stuff, but I've been slacking off of late. My wife had to leave town for a few days, so I've had nothing better to do then look at my own website; no more slacking excuses. The first broken thing that comes to mind is my wife's photography page; a  sales page I thought up about a decade ago, that doesn't require server side action. I.e., this sales site runs strictly on the client. This means that the sales have to be recorded  on a client side shopping cart; the shopping cart stopped working. ...and, I just fixed the shopping cart.

The shopping cart knows what it can sell by reading that info from a text file; originally, Offer.data. The shopping cart stopped displaying this info, making it impossible to buy stuff. I wrote this site in Java (it's a JApplet, an applet written with swing graphics), so all I had to do too figure out the problem was run the Java console while the shopping cart loaded. This was what I found: network: Cache entry not found [url: http://community-info.org/slideshows/Offer.data, version: null]. This error was followed by (another error) FileNotFoundException; the Java JApplet was unable to find the data file, Offer.data.

Fortunately for me, I've been working in technical support for the last 3 years; i.e., I've been having to find non-code solutions to technical problems. So, rather then modifying my Java code to resolve the issue, I messed around with Offer.data  too see if that would do the trick. At first I looked at the permissions, ownership, etc. too see if this was really an "access denied" issue; it wasn't. Then I had the amazing idea that this might be solvable  by changing the file name from Offer.data to Offer.txt; that did it! I found a non-code solution to a problem that had cropped up in some code I had written.

BTW, my solution implies the possibility of another solution. *.txt files are a known mime type to my web server; IIS 7.5. I probably could've gone into the IIS Manager and added data as a mime type. 

 

Return To My Blog Page       Return To My Programming Page