Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(ARM).Porting the ARM webserver programmer's guide.Ver 1.6.pdf
Скачиваний:
27
Добавлен:
23.08.2013
Размер:
1.19 Mб
Скачать

Porting Step-by-Step

3.2Start with HTML sources

The first thing your webserver needs is something to serve. You must have at least one HTML page to determine whether your webserver is operational. If some or all the pages are to go in the VFS, you should first set up your makefiles and HTML compiling in an organized manner.

You can start with one or more pages. They can be created using any HTML authoring tool, or built manually with a simple text editor. If you want to begin coding right away and do not have your own pages, you can use pages from the demonstration program (see Demonstration program on page 1-3). HTML links do not have to be resolvable for you to prototype a server, but any graphics files your pages reference should be included.

3.2.1Index.htm

Generally, you can choose the names of your pages (although it is recommended that HTML pages end in .htm or .html). The home or main page, however, should be named index.htm. Traditionally, this is the name of the page that is at the root of the system of links in a webserver. Whenever you connect to the root of a new webserver (for example, by typing in a URL like www.company.com), the page you first see is probably named index.htm or index.html. If you already have a set of HTML pages, it is likely that one of them is named index.htm.

The reason for naming the root page index.htm is that the server assigns this name by default if no file name is specified in the request from the browser. If using the ARM Webserver primarily for configuration and status monitoring, the end user will probably access your device by typing the IP address or host name in the URL window of a browser, for example:

http://192.9.200.99/

The browser then sends a GET request for a file, but the filename will be /. When this happens, the server is returns the index.htm file.

ARM DUI 0075D

Copyright © 1999-2001 ARM Limited. All rights reserved.

3-5