1. Field of the Invention
The present invention relates to a built-in apparatus, a HTTP request distribution method, a recording medium for storing a program to implement the method and a Web system.
2. Description of the Related Art
In conventional Web servers, a Web page is implemented in form of a file, and URL (Uniform Resource Locator) is managed under file-base management. Also, CGI (Common Gateway Interface) is likewise managed under file-base management, and dynamically determined values are processed by giving parameters to files.
However, in a WWW (World Wide Web) server operable in a so-called “built-in apparatus” such as an image forming apparatus, which can be differentiated from an ordinary information processing apparatus such as a personal computer and a server in that the built-in apparatus includes OS (Operating System) and applications, a Web page is usually implemented as a process function rather than a file for the purpose of saving resources thereof. Thus, when a built-in apparatus receives a HTTP request having URL and a process function from a HTTP client (browser), the built-in apparatus has to manage the URL and the process function in a server program in such a way that the URL is associated with the process function.
Japanese Laid-Open Patent Application No. 10-173890 discloses a facsimile apparatus as a built-in apparatus implementing a WWW server. The facsimile apparatus, in response to receipt of an instruction from an external PC via a browser, actuates a FAX transmission function.
As described above, in a WWW server operable in a built-in apparatus, such as an image forming apparatus, URLs and process functions must be managed in a server program in such a way that the URLs are associated with the process functions. As a result, if all of such relations were managed in the WWW server, considerable workloads would be imposed on the WWW server, resulting in performance reduction.
On the other hand, if URLs are file-base managed like ordinary WWW servers, Web pages are determined based on only the URLs. In a WWW server in a built-in apparatus, however, process functions finally undertake display processes on Web pages, and thus there is room of availability of various controls based on information other than URLs. For example, limited access to Web pages based on information other than URLs can be adopted in such a way that while a Web page is displayed for a HTTPS request, the Web page is not displayed for a HTTP request. It is noted that HTTPS is HTTP having a security function in accordance with SSL (Secure Socket Layer). However, no mechanism to implement the above operation has been designed, including disclosure of Japanese Laid-Open Patent Application No. 10-173890.
It is a general object of the present invention to provide a built-in apparatus, a HTTP request distribution method, a recording medium for storing a program to implement the method, and a Web system in which one or more of the above-mentioned problems are eliminated.
A more specific object of the present invention is to provide a built-in apparatus, a HTTP request distribution method, a recording medium for storing a program to implement the method, and a Web system that can not only prevent performance reduction by decreasing workloads on a server program due to association of URLs with process functions but also provide various controls based on information other than URL.
In order to achieve the above-mentioned objects, there is provided according to one aspect of the present invention a built-in apparatus having a WWW server function wherein a Web page is implemented as a process function, including: a first distribution part distributing a process corresponding to a HTTP request to a Web application associated with an application path of URL in the HTTP request; and a second distribution part distributing the process to a process function associated with a URL path of the URL in the Web application.
Additionally, there is provided according to another aspect of the present invention a method of distributing a HTTP request for a built-in apparatus having a WWW server function wherein a Web page is implemented as a process function, the method including steps of: distributing a process corresponding to a HTTP request to a Web application associated with an application path of URL in the HTTP request; and distributing the process to a process function associated with a URL path of the URL in the Web application.
Additionally, there is provided according to another aspect of the present invention a computer readable recording medium for storing a program to cause a computer to execute a procedure, the procedure including steps of distributing a process corresponding to a HTTP request to a Web application associated with an application path of URL in the HTTP request; and distributing the process to a process function associated with a URL path of the URL in the Web application.
Additionally, there is provided according to another aspect of the present invention a Web system having a built-in apparatus having a WWW server function and a plurality of clients wherein the built-in apparatus enables a Web page to be implemented as a process function and is connected to the plurality of clients via a network, including: a first distribution part distributing a process corresponding to a HTTP request to a Web application associated with an application path of URL in the HTTP request; and a second distribution part distributing the process to a process function associated with a URL path of the URL in the Web application.
According to one aspect of the present invention, it is possible to not only prevent performance reduction by decreasing workloads on a server program due to association of URLs with process functions but also provide various controls based on information other than URL.
Other objects, features and advantages of the present invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings.
In the following, embodiments of the present invention will be described with reference to the accompanying drawings.
Referring to
The image forming apparatus 1, in response to receipt of requests from the HTTP clients 9, can print document data or FAX-transmit data. In addition, the image forming apparatus 1, in response to HTTP requests from the HTTP clients 9, can transmit to the HTTP clients 9 Web pages for displaying information requested by the HTTP requests. For example, if a user of a HTTP client 9 requests status information on the image forming apparatus 1 via a Web browser, the image forming apparatus 1 sends HTML (HyperText Markup Language) data having the status information to the HTTP client 9. In this embodiment, the HTTP client 9 may be PC, PDA (Personal Digital Assistant) or a cellular phone. Also, the HTTP client 9 has a Web browser to display Web pages delivered from the image forming apparatus 1.
Referring to
The application layer 2 includes software items to perform separate functions of the image forming apparatus 1. The application layer 2 is composed of a copying application 2a to implement a copying function, a FAX application 2b to implement a FAX function, a printer application 2c to implement a print function and a network file application 2d to implement a function to exchange files via a network. The application layer 2 further includes a Web application 20 having application items to implement Web services in accordance with HTTP protocol. The Web application 20 is composed of Web application items “websys” 20a, “webdocbox” 20b, “GPS-web” 20c and “Fax-web” 20d. The Web application item “websys” 20a enables a user to view the status of the image forming apparatus 1 via a Web browser and set network configuration of the image forming apparatus 1. The Web application item “webdocbox” 20b uses the network file application 2d to exchange and manage documents via a Web browser. The Web application item “GPS-web” 20c displays job history (spool status) of a printer component of the image forming apparatus 1. The Web application item “Fax-web” 20d displays initial configuration and communication management report (communication history) of a FAX component of the image forming apparatus 1 in form of tables.
The platform layer 4 includes software items to provide common service functions to application items of the application layer 2 via the interface 3. The platform layer 4, if broadly divided, is composed of a service layer 5 and an OS layer 6. The service layer 5 includes SCS (System Control Service) 5a, FCS (FAX Control Service) 5b, ECS (Engine Control Service) 5c, MCS (Memory Control Service) 5d, OCS (Operation panel Control Service) 5e and NCS (Network Control Service) 5f. SCS 5a implements a plurality of functions: application management, operation part control, system screen display, LED display, resource management, interrupt control and so on. FCS 5b provides API (Application Programming Interface) of FAX functions. ECS 5c controls the engine part 8. MCS 5d controls memories of the image forming apparatus 1. OCS 5e controls an operation part (operation panel), which works as an interface to an operator, of the image forming apparatus 1. NCS 5f provides common services that application items can use in common to input/output data via a network. The OS layer 6 includes OS (LPUX) 61.
The engine-part 8 includes some engines, such as a plotter 81, a scanner 82 and other hardware resources 83, and an engine control board 84 to control these engines.
Referring to
In the controller 101, ASIC (Application Specific Integrated Circuit), which is an image processing dedicated IC, is connected to CPU (Central Processing Unit) 106, which is a general-purpose control IC, via NB (North Bridge) 105. Also, a PCI bus of NB 105 is connected to SB (South Bridge) 108 connectable to peripheral devices, NIC 109 to control network communication, USB 110 to provide a USB interface, IEEE1394 111 to provide an IEEE1394 interface, and a centronics 112 to provide a centronics interface. Moreover, ASIC 102 is connected to MEM-C 103 and HDD 104 as storage devices. NB 105 is connected to MEM-P 107 as a storage device.
Referring to
Referring to
Referring back to
The Web application 21 further includes an initialization function 26 to perform initialization processes, such as table creation, on the method distributor 221, the service distributor 222, the URL distributor 223 and so on. The other components of the Web application 21 are similar to those shown in
Referring to
Furthermore, the Web application library 22 further includes a “notFound” handler 224 to reply display information indicating that there is no relevant page. The other components of the Web application 21 are similar to those shown in
Referring to
Exemplary operation of the image forming apparatus 1 according to this embodiment is described.
Referring to
If the associated Web application is not registered (S2: No), the HTTP daemon 51 actuates the notFound handler 224 to reply an error response (NotFound) to the HTTP client 9 at step S3, and the distribution operation is terminated.
On the other hand, if the associated Web application is registered (S2: Yes), the HTTP daemon 51 delivers the HTTP request to the found Web application 21 to commit the process corresponding to the HTTP request at step S4. This action corresponds to a first distribution operation performed by the HTTP daemon 51.
Then, the Web application 21 searches a registration table for a process function (Web page handler) associated with the URL path at step S5.
If the associated process function is not registered (S6: No), the Web application 21 actuates the notFound handler 224 to reply an error response (NotFound) to the HTTP client 9 at step S7, and the distribution operation is terminated.
On the other hand, if the associated process function is registered (S6: Yes), the Web application 21 executes the found process function at step S8, and then the distribution operation is terminated. This action corresponds to a second distribution operation performed by the Web application 21.
In this manner, the HTTP daemon 51 only has to perform the first distribution operation to distribute a process to a Web application associated with the process. Then, the Web application 21 performs the second distribution operation to distribute the process to a process function associated with the process. As a result, it is possible to prevent performance reduction due to increase in workloads on the HTTP daemon 51, which works as a server program, to associate URL with the process function.
Referring to
The actuated service distributor 222 searches for a URL distributor associated therewith based on a service (service indicated in a port identifier) of the request information at step S12. Specifically, the service distributor 222 searches the service table T2 shown in
If the associated URL distributor is not registered (S13: No), the service distributor 222 actuates the notFound handler 224 to reply an error response to the HTTP client 9 at step S14, and then the distribution operation is terminated.
On the other hand, if the associated URL distributor is registered (S13: Yes), the service distributor 222 actuates the found URL distributor 223 at step S15.
At step S16, the actuated URL distributor 223 searches for a Web page handler (process function) associated therewith based on a URL path of the request information. Specifically, the URL distributor 223 searches the URL table T3 shown in
If the associated Web page handler is not registered (S17: No), the URL distributor 223 actuates the notFound handler 224 to replay an error response to the HTTP client 9 at step S18, and then the distribution operation is terminated.
On the other hand, if the associated Web page handler is registered (S17: Yes), the URL distributor 223 actuates the found Web page handler 24, and then the distribution operation is terminated.
In this manner, the Web application 21 performs the second distribution operation to distribute a process to a process function (Web page handler) based on methods, services (port identifiers) and URL paths. As a result, it is possible to not only properly associate URLs in a WWW server in a built-in apparatus with process functions but also control various page accesses. For example, it is possible to control the built-in apparatus in such a way that while pages are displayed for HTTPS requests, no page is displayed for HTTP requests.
Although methods, services (port identifiers) and URL paths are used as distribution indicators in this embodiment, content types, languages, user agents or the like may be used as the distribution indicators.
An exemplary initialization operation of distribution information, which is actuated in response to start of the system, is described.
Referring to
At step S24, the initialization function 26 creates a HTTP URL table T3 likewise, and registers a process function associated with a URL path of a Web page displayed for the HTTP request together with the association in HTTP URL table T3 at steps S25 and S26.
At step S27, the initialization function 26 creates a service table T2, and registers a correspondence between services and URL distributors at steps S28 and S29.
At step S30, the initialization function 26 creates a method table T1, and registers a correspondence between methods and service distributors. It is noted that the method table T1 and the method distributor 221 are under management of a system (HTTP connection manager) to control communication.
In this manner, the method table T1, the service table T2 and the URL table T3 in use for a distribution operation are created in the initialization operation at start of the system.
The present invention is not limited to the specifically disclosed embodiments, and variations and modifications may be made without departing from the scope of the present invention.
The present application is based on Japanese Patent Priority Application No. 2003-329078 filed Sep. 19, 2003, the entire contents of which are hereby incorporated by reference.
Number | Date | Country | Kind |
---|---|---|---|
2003-329078 | Sep 2003 | JP | national |