1. Field of the Invention
This invention relates to a web page providing method and apparatus and program and in particular to a web page providing method and apparatus and program capable of providing a web page of appropriate type upon reception of a display request from a browser.
2. Description of the Related Art
In recent years, the Internet users have increased rapidly and various pieces of information have been provided by various methods accordingly. For example, in some of web services most frequently used among the services using the Internet, a web page displayed when the user accesses with a web browser is changed dynamically matching each user.
A dynamic web page generally is provided by web application; it is used when a web page in the language matched with the environment of the browser used by the user is provided, etc., for example.
FIG. 7 is a block diagram to show a server configuration in a related art for providing a dynamic web page. As shown in the figure, a server 500 comprises a request processing section 501, a language information extraction section 502, a resource processing section 503, a page processing section 504, and a resource storage section 505.
In the configuration, when the user enters a URL with a browser 600, presses a form button, or clicks on a link, the browser 600 transmits a request to the server 500. This request also contains language information set in the browser 600.
In the server 500, when the request processing section 501 accepts the request, the language information extraction section 502 extracts the language information contained in the request and sends the extracted language information through the request processing section 501 to the resource processing section 503.
Next, to generate a page returned to the browser 600, the request processing section 501 executes processing of a dynamic page stored in the page processing section 504. The dynamic page is a format in which a program is embedded in a page described in HTML, etc. As the program is processed, the page returned to the browser 600 is completed. This means that the dynamic page acts as a template to generate a page.
FIG. 8 shows a description example of a dynamic page. In the figure, programs are denoted by numerals 701 and 702 and others are described in HTML. The processing result of the dynamic page is displayed as a page as shown in FIG. 9. However, Japanese character strings are described on the dynamic page shown in FIG. 8 and thus the page displayed in the browser 600 also becomes Japanese.
To avoid this and return a page responsive to the language information set in the browser 600, the character strings described in the page are stored in the resource storage section 505 as external files, and the external file corresponding to the language information is acquired through the resource processing section 503. The external files are described as shown in FIGS. 10A and 10B, for example.
By the way, most of the browsers 600 enable the user to specify a plurality of desired languages to which the priority is given. In contrast, when a resource is acquired from the resource storage section 505, only one language can be specified.
Thus, if the resource corresponding to the specified one language does not exist in the server 500 in the related art, a page described in the language fitted for setting in the browser 600 cannot be returned. A response cannot be returned.
To return a page based on the language information set in the browser 600 as a response, all character strings depending on the language in the page must be acquired from the resource storage section 505. On the other hand, generally most of dynamic page include language-dependent character strings. Describing a dynamic page containing such a program to acquire all the character strings from the resource storage section 505 becomes a burden of web application construction.
One of the advantages of a dynamic page is that a program to generate a dynamic message, etc., is entered in a part of the displayed page and the page design can be understood by seeing the description of the dynamic page like description in HTML. However, if character strings other than the dynamic message are also acquired externally, the advantage is spoiled.