ZHTML extensions on FAT

Hi, i need help with this problem please.

I have a fat system into sd card in RCM4300, and i need to include .zhtml script files, but i just read that FAT 16 system doesn�t support long name files or extension (it must be 8.3) and .zhtml has 5. I don�t know how to do…, someone can help me with this?.

Thanks

The ZHTML format is handled internally by the Rabbit, you can make that extension whatever you want it to be. Just declare the extension you intend to use. For instance, if you wanted to use ‘zht’ as your 8.3 extension, then you use something like the following SSPEC_MIMETABLE declaration:

// This table maps file extensions to the appropriate "MIME" type.  This is
// needed for the HTTP server.
SSPEC_MIMETABLE_START
	SSPEC_MIME_FUNC(".zht", "text/html", zhtml_handler),
	SSPEC_MIME(".htm", "text/html"),
	SSPEC_MIME(".cgi", ""),
	SSPEC_MIME(".gif", "image/gif"),
SSPEC_MIMETABLE_END

Another question, i�m using the fat_setup sample to upload files to sd card (fat system), in that case. How can i upload .zhtml to sd card?. I�m not using SSPEC_MIMETABLE in this case. I�m using something like this:

// “flashspec” name FAT file name
// ----------------- ---------------
copy(“/index.html”, “/A/index.htm”);
copy(“/index1.html”, “/A/index1.htm”);
copy(“/topframe.html”, “/A/topframe.htm”);
copy(“/leftframe.html”, “/A/leftframe.htm”);
copy(“/auxframe.html”, “/A/auxframe.htm”);
copy(“/logo.jpg”, “/A/logo.jpg”);
copy(“/lateral.jpg”, “/A/lateral.jpg”);
copy(“/head.jpg”, “/A/head.jpg”);
copy(“/update.zhtml”, “/A/update. ???”);

Thanks for your answer.

If we follow along with the example extension I gave, then:

copy(“/update.zhtml”, “/A/update.zht”);

You could also copy files to the SD card on a PC, just give the shortened 8.3 names and extensions, either when copying, or by renaming.

Thank you, it works!. But I have another problem: I loaded rabbitweb (.zhtml) into the fat system in SD card, when I open the web browser in default IP, it works, but, if I try to return to .zhtml page it shows me an error. (cannot find web page). I try closing web browser and then open, but it doesn�t work. So, my application only works once. Can you help me with that problem?.

Thanks for your answer.

When you say you try to return to .zhtml page, what exactly do you mean. Is there a URL you are using that is giving the error? If so, what is the URL that gives the error.

When I say I want to return to the page…I’m trying to load zhtml page again, but it loads it the first time, my question is, How can I use the updating.c (rabbitweb) embbeded in a FAT system?. Because i could load pages in FAT system (SD card), including zhtml page, but this page doesn’t work (only the first time).

Thanks for your help bsprouse.