18 Jan 2011 09:17
Re: Dynamic web page
Stefan Schake <caytchen <at> gmail.com>
2011-01-18 08:17:57 GMT
2011-01-18 08:17:57 GMT
Hey, there is not really a notion of filenames or files in httpd-cgi, since its not built on top of a real filesystem. Files are only hardcoded byte arrays that have an filename associated with them in the web server. Also, httpd-cgi certainly doesn't care about any standards that might be associated with those file-types; the only difference between them, as far as the server is concerned, is how they're processed. A file with '.html' will simply be sent in its entirety to the client, while '.shtml' files are processed with its simplistic scripting system. Check out line 236 of httpd.c (http://www.sics.se/~adam/uip/uip-1.0-refman/a00185.html); this is where it checks if there was an request for a .shtml file (and if so, process it through the script interface), otherwise just send its content directly back to the client. You can modify or remove this very check and it will try to process all files (regardless of '.shtml' or '.html' ending) through the script interface. Greetings 2011/1/18 <sumeshrkdoe <at> cusat.ac.in>: > I have uIP webserver running on ARM CORTEX M3 > It works fine, it pings, upload webpages etc. > It also works fine for dynamic web pages, in which the server can update > the data with out refresh the whole page. This function is implemented by > using AJAX in web page. > This dynamic data file was '.shtml' file type. Only '.shtml' file > contents could be updated throgh 'httpd-cgi' file in uip webserver. When I > use '.html' file type or '.cgi' file type for dynamic pages, it doesn't > work. > > When refering to uIP webserver example, it shows how to pull dynamically > generated data to be displayed on the web page. > In the example 'stats.shtml' and 'tcp.shtml' are the files with dynamic data. > It works fine, and these file contents are updated. > > This '.shtml' file type has much limitations compared to html file. > In my apllication I would like to use '.html' file for dynamically > generated data. > > Can anyone please tell me, how can I use '.html' file for dynamic data. > > Thanks in advance. > >
RSS Feed