JP2009065238A - Information processing apparatus - Google Patents

Information processing apparatus Download PDF

Info

Publication number
JP2009065238A
JP2009065238A JP2007228768A JP2007228768A JP2009065238A JP 2009065238 A JP2009065238 A JP 2009065238A JP 2007228768 A JP2007228768 A JP 2007228768A JP 2007228768 A JP2007228768 A JP 2007228768A JP 2009065238 A JP2009065238 A JP 2009065238A
Authority
JP
Japan
Prior art keywords
function
file
control unit
template file
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007228768A
Other languages
Japanese (ja)
Other versions
JP5140351B2 (en
Inventor
Takuya Fukada
卓也 深田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyocera Document Solutions Inc
Original Assignee
Kyocera Mita Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyocera Mita Corp filed Critical Kyocera Mita Corp
Priority to JP2007228768A priority Critical patent/JP5140351B2/en
Priority to US12/203,662 priority patent/US8073872B2/en
Publication of JP2009065238A publication Critical patent/JP2009065238A/en
Application granted granted Critical
Publication of JP5140351B2 publication Critical patent/JP5140351B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To substitute a character string determined by one function for a plurality of tokens according to a result of processing by the one function. <P>SOLUTION: Information representing whether FAX transmission is performed normally is substituted in a return value *OUT[0] by a function sendFax and it is returned to an image processing control unit through an image processing unit. According to a query character string, the image processing control unit supplies a path of a template file OK.html to a GET processing control unit to generate an OK.htm file when *OUT[0]="OK", and supplies a path of a template file NG.html to the GET processing control unit to generate an NG.htm file when *OUT[0]="NG". A message token $msg1$ is included in the template file OK.htm and message tokens $msg1$ and $msg2$ are included in the template file NG.htm. Those are replaced with *OUT[1] and *OUT[2] through processes of steps S39 and S34 by an HTML translator 355. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、Webクライアントからの遠隔操作を可能にするWebサーバ機能を備えた情報処理装置に関する。   The present invention relates to an information processing apparatus having a Web server function that enables remote operation from a Web client.

下記特許文献1には、この種の画像形成装置において、ID化された情報が記載されたHTMLテンプレートの各IDを対応する情報に置き換えて動的にHTMLファイルを作成することが開示されている。
特開2006−155356
Japanese Patent Application Laid-Open No. 2004-259561 discloses that in this type of image forming apparatus, an HTML file is dynamically created by replacing each ID of an HTML template in which ID information is described with corresponding information. .
JP 2006-155356 A

しかし、単純な置換であるため、1つの関数で1つしか置換できず、1つの関数で処理した結果に応じて複数のトークンのそれぞれを対応する文字列で置換させることができない。例えば、FAX送信関数でFAX送信した場合、この関数で複数のトークンのそれぞれを、FAX送信の成否、成功した場合の処理完了時刻及び失敗した場合の原因などで置換することができない。   However, since it is a simple replacement, only one can be replaced with one function, and each of a plurality of tokens cannot be replaced with a corresponding character string according to the result processed with one function. For example, when FAX transmission is performed using the FAX transmission function, it is not possible to replace each of the plurality of tokens with the success or failure of the FAX transmission, the processing completion time when the transmission is successful, and the cause when the transmission fails.

本発明の目的は、このような問題点に鑑み、1つの関数で処理した結果に応じて複数のトークンのそれぞれを、該関数により定まる文字列で置換させることができる情報処理装置を提供することにある。   In view of such a problem, an object of the present invention is to provide an information processing apparatus capable of replacing each of a plurality of tokens with a character string determined by the function according to the result of processing by one function. It is in.

本発明の第1態様では、
プロセッサと、
Webアプリケーションと、テンプレートファイルとが格納され、該プロセッサに結合された記憶手段と、
を備えた情報処理装置において、該Webアプリケーションは、
関数と、
該プロセッサに対し、リスポンスボディを作成させるために、指定されたテンプレートファイルに含まれるコンテキスト・トークン、例えばメッセージ・トークンを、該関数の返り値で置換させるトランスレータとを有し、該コンテキスト・トークンは識別子を含み、該関数は該識別子に応じた複数の返り値を有する。
In the first aspect of the present invention,
A processor;
Storage means for storing a web application and a template file and coupled to the processor;
In the information processing apparatus including the Web application,
Functions and
In order to cause the processor to create a response body, a context token included in a specified template file, for example, a message token is substituted with a return value of the function, and the context token is The function includes an identifier, and the function has a plurality of return values corresponding to the identifier.

本発明による情報処理装置の第2態様では、第1態様において、該返り値は配列要素の内容であり、該識別子は該配列要素を識別するインデックスである。   In the second aspect of the information processing apparatus according to the present invention, in the first aspect, the return value is the content of the array element, and the identifier is an index for identifying the array element.

本発明による情報処理装置の第3態様では、第1又は2態様において、該Webアプリケーションは、返り値の形式が統一された関数を複数有し、該置換は該複数の関数のどれであるかとは無関係に行われる。   In the third aspect of the information processing apparatus according to the present invention, in the first or second aspect, the Web application has a plurality of functions with a unified return value format, and the replacement is any of the plurality of functions. Is done independently.

上記第1態様の構成によれば、識別子を含むコンテキスト・トークンを、識別子に応じた複数の返り値を有する関数の該返り値で置換させるので、1つの関数で処理した結果に応じて複数のコンテキスト・トークンのそれぞれを、該関数により定まる文字列で置換させることができるという効果を奏する。例えば、FAX送信関数でFAX送信した場合、複数のコンテキスト・トークンのそれぞれを、この関数の複数の返り値であるFAX送信の成否、成功した場合の処理完了時刻及び失敗した場合の原因などで置換することができる。   According to the configuration of the first aspect, the context token including the identifier is replaced with the return value of the function having a plurality of return values corresponding to the identifier. Each of the context tokens can be replaced with a character string determined by the function. For example, when FAX transmission is performed with the FAX transmission function, each of the plurality of context tokens is replaced with the success / failure of FAX transmission, which is a plurality of return values of this function, the processing completion time when succeeding, and the cause when failing. can do.

上記第2態様の構成によれば、該返り値が配列要素の内容であり、該識別子が該配列要素を識別するインデックスであるので、コンテキスト・トークンと関数の複数の返り値との対応関係がシンプルで分かり易いという効果を奏する。   According to the configuration of the second aspect, since the return value is the contents of the array element and the identifier is an index for identifying the array element, the correspondence between the context token and the plurality of return values of the function is It is simple and easy to understand.

上記第3態様の構成によれば、返り値の形式が統一された関数を複数有し、該複数の関数のどれであるかとは無関係に該置換が行われるので、複数の関数の各々の処理結果を1つのテンプレートファイルで対処することができるという効果を奏する。   According to the configuration of the third aspect, since there are a plurality of functions whose return value formats are unified and the replacement is performed regardless of which of the plurality of functions, each processing of the plurality of functions is performed. There is an effect that the result can be dealt with by one template file.

本発明の他の目的、構成及び効果は以下の説明から明らかになる。   Other objects, configurations and effects of the present invention will become apparent from the following description.

図15は、本発明の実施例1に係る画像形成システムのハードウエア概略ブロック図である。   FIG. 15 is a schematic hardware block diagram of the image forming system according to Embodiment 1 of the present invention.

情報処理装置としての画像形成装置10は、コピー、プリント、FAX送受信及び電子メール送信を行うことが可能な複合機である。画像形成装置10は、HTTPに従ったWebサーバマシンとしても機能し、イントラネット内のホストコンピュータの汎用ブラウザによる画像形成装置10の遠隔操作が可能となっている。   The image forming apparatus 10 serving as an information processing apparatus is a multifunction machine capable of performing copying, printing, FAX transmission / reception, and electronic mail transmission. The image forming apparatus 10 also functions as a Web server machine complying with HTTP, and the image forming apparatus 10 can be remotely operated by a general-purpose browser of a host computer in the intranet.

画像形成装置10では、MPU11にインターフェイス12を介してPROM13、DRAM14、操作パネル15、プリンタ16、スキャナ17、NIC(Network Interface Card)18及びFAXモデム19が接続されている。図15では簡単化のため、複数のインターフェイスを1つのブロックで示している。   In the image forming apparatus 10, a PROM 13, a DRAM 14, an operation panel 15, a printer 16, a scanner 17, a NIC (Network Interface Card) 18, and a FAX modem 19 are connected to the MPU 11 through an interface 12. In FIG. 15, for simplification, a plurality of interfaces are shown as one block.

PROM13は、例えばフラッシュメモリであり、これにはマルチプロセス及びマルチスレッドの機能を備えた汎用OS(オペレーティングシステム)、Webサーバ及びWebアプリケーション(画像形成処理プログラムを含む)並びに後述の各種データが格納されている。OSは、例えばLinux(登録商標)である。   The PROM 13 is, for example, a flash memory, and stores a general-purpose OS (operating system) having multi-process and multi-thread functions, a Web server and a Web application (including an image forming processing program), and various data described below. ing. The OS is, for example, Linux (registered trademark).

DRAM14は、ワークエリア用であり、マルチプロセス及びマルチスレッドのインスタンス並びにリクエストメッセージ、リスポンスメッセージ及びこれらに関係したデータが格納され、解放される。操作パネル15は、設定値又は指示を入力し、設定画面や状態などを表示させるためのものである。プリンタ16は、コピー及びファックス送信での画像入力用である。スキャナ17は、プリントエンジン並びに用紙の給紙部、搬送部及び排紙部を備え、DRAM14内に生成されたビットマップデータが供給され、このデータに基づいて感光ドラムに静電潜像を形成し、この像をトナーで現像し、トナー像を用紙に転写し定着させ、排紙する。NIC18は、ケーブル又は無線の通信媒体を介して複数のWebクライアントマシーン20、21、・・・に結合される。FAXモデム19は、公衆回線網28を介して任意のFAX装置29に結合される。   The DRAM 14 is used for a work area, and multi-process and multi-thread instances, request messages, response messages, and data related thereto are stored and released. The operation panel 15 is used for inputting a setting value or an instruction and displaying a setting screen or a state. The printer 16 is used for image input for copying and fax transmission. The scanner 17 includes a print engine, a paper feed unit, a conveyance unit, and a paper discharge unit. The bitmap data generated in the DRAM 14 is supplied, and an electrostatic latent image is formed on the photosensitive drum based on the data. Then, this image is developed with toner, and the toner image is transferred and fixed on a sheet, and discharged. The NIC 18 is coupled to a plurality of Web client machines 20, 21,... Via a cable or a wireless communication medium. The FAX modem 19 is coupled to an arbitrary FAX apparatus 29 via the public line network 28.

図1は、主に画像形成装置10のソフトウエア構成を示す機能ブロック図である。   FIG. 1 is a functional block diagram mainly showing a software configuration of the image forming apparatus 10.

画像形成装置10では、PROM13(図15)内に、プログラムとして、OS30と、その上層のinetd31、httpd32、メール送信サーバ33、メインWebサーバ34、Webアプリケーション35及びDBMS(database management system)36とを備え、データとして、静的リソース37と、HTMLテンプレートファイル38と、バッファサイズテーブル39と、言語テーブルファイル40と、データベース41と、コンフィグレーションファイル42とを備えている。   In the image forming apparatus 10, an OS 30, an upper layer 31, an httpd 32, a mail transmission server 33, a main Web server 34, a Web application 35, and a DBMS (database management system) 36 are stored as programs in the PROM 13 (FIG. 15). The data includes a static resource 37, an HTML template file 38, a buffer size table 39, a language table file 40, a database 41, and a configuration file 42.

inetd31、httpd32及びメール送信サーバ33は汎用プログラムである。inetd31及びhttpd32中の文字"d"は、バックグラウンドで動作するデーモンであることを示しており、それぞれプロセスとして動作する。メインWebサーバ34、Webアプリケーション35及びDBMS36は1つのプロセスとして動作する。   inetd31, httpd32, and mail transmission server 33 are general-purpose programs. The characters “d” in inetd 31 and httpd 32 indicate that the daemon operates in the background, and each operates as a process. The main Web server 34, Web application 35, and DBMS 36 operate as one process.

inetd31を用いている理由は、既存の資産を有効利用してメインWebサーバ34の構成を簡単化するためである。inetd31は、定義ファイルに記述された1つ以上のポートを監視するのでスーパーサーバと称されており、クライアントとの間でTCP接続が確立する毎に、そのポート番号に対応した、定義ファイルに記述されているプログラムを起動させる。本実施例では、inetd31は80番のポートのみ監視し、クライアントとの間でTCP接続が確立する毎にhttpd32を起動させる。inetd31は、セキュリティ機能(フィルタ)も備えており、本実施例では、定義ファイルに記述されたローカルIPアドレスを持つクライアントからの接続要求のみ受け付ける。   The reason for using inetd 31 is to simplify the configuration of the main Web server 34 by effectively using existing assets. The inetd 31 is called a super server because it monitors one or more ports described in the definition file, and is described in the definition file corresponding to the port number each time a TCP connection is established with the client. Start the program that is running. In this embodiment, inetd 31 monitors only port 80 and starts httpd 32 each time a TCP connection is established with the client. The inetd 31 also includes a security function (filter). In this embodiment, the inetd 31 accepts only a connection request from a client having a local IP address described in the definition file.

httpd32を用いている理由は、これを用いないとinetd31が接続要求を受け付ける毎にメインWebサーバ34が起動されることになるからである。メインWebサーバ34は、システム起動時に1回起動させれば、後述のように、メインWebサーバ34内でリクエスト毎にスレッドが生成されて並行処理が可能となっており、リクエスト毎にプロセスを生成するよりもメモリを節約することができる。   The reason for using httpd32 is that if this is not used, the main Web server 34 is started each time the inetd 31 accepts a connection request. If the main Web server 34 is started once when the system is started, as will be described later, a thread is generated for each request in the main Web server 34 so that parallel processing is possible, and a process is generated for each request. You can save memory than you do.

本実施例1によれば、既存の資産を有効利用してメモリ資源節約型メインWebサーバの構成を簡単化しその開発期間を短縮することができるという効果を奏する。   According to the first embodiment, it is possible to simplify the configuration of the memory resource saving main Web server by effectively using existing assets and shorten the development period.

httpd32は、起動されると、inetd31でTCP接続が確立したクライアントからのリクエストメッセージを、Webクライアントマシーン20からNIC18及びOS30を介し受け取り、パイプでメインWebサーバ34に渡した後、DRAM14上から消滅する。すなわち、httpd32は、仲介役としてのみ機能する。このため、この仲介に必要な機能のみコンパイルされて用いられ、これによりメモリをさらに節約することができるという効果を奏する。   When httpd32 is activated, it receives a request message from a client whose TCP connection has been established by inetd31 from the Web client machine 20 via the NIC 18 and OS 30, passes it to the main Web server 34 through a pipe, and then disappears from the DRAM 14. . That is, httpd32 functions only as an intermediary. For this reason, only the functions necessary for this mediation are compiled and used, thereby achieving an effect of further saving the memory.

メインWebサーバ34では、HTTP処理スレッド生成部340が、httpd32からのリクエストメッセージを受け取ってHTTP処理スレッド341を生成し、このメッセージの識別子をHTTP処理スレッド341のコンストラクタに引き渡し、HTTP処理スレッド341を起動させる。   In the main Web server 34, the HTTP processing thread generation unit 340 receives the request message from the httpd 32, generates an HTTP processing thread 341, passes the identifier of this message to the constructor of the HTTP processing thread 341, and starts the HTTP processing thread 341. Let

HTTP処理スレッド341は、このメッセージをパースし、メッセージに含まれているリクエストURI中のパス及びGETメソッドの場合のクエリ文字列、各フィールド名とその値、POSTメソッドの場合には変数名とその値(本明細書及び特許請求の範囲では、POSTメソッドにおいて、GETメソッドの場合のクエリ文字列に対応するものもクエリ文字列と称す)を、予め定めた構造体の変数の対応する要素に代入し、この構造体変数(以下、S変数と称す。)の識別子(以下、S識別子と称す。)を引数として処理粗振分部342を呼び出す。   The HTTP processing thread 341 parses this message and includes the path in the request URI included in the message and the query character string in the case of the GET method, each field name and its value, and in the case of the POST method, the variable name and its A value (in the present specification and claims, in the POST method, a value corresponding to a query character string in the case of the GET method is also referred to as a query character string) is assigned to a corresponding element of a variable of a predetermined structure Then, the process rough allocating unit 342 is called with the identifier (hereinafter referred to as S identifier) of the structure variable (hereinafter referred to as S variable) as an argument.

以下の処理では、リクエストメッセージ中の情報が、S変数の対応する要素を介して用いられ、これにより以下の複数の処理のそれぞれが簡単になる。リクエストURI中のパスが格納されたS変数の要素をS変数.パス、クエリ文字列が格納されたS変数の要素をS変数.クエリ文字列と表記する
図3は、処理粗振分部342による処理を示すフローチャートである。以下、カッコ内は図中の識別符号である。
In the following process, the information in the request message is used via the corresponding element of the S variable, which simplifies each of the following processes. The element of the S variable in which the path in the request URI is stored is the S variable. The element of the S variable in which the path and query string are stored is the S variable. FIG. 3, which is referred to as a query character string, is a flowchart showing processing by the processing rough distribution unit 342. Hereinafter, the parentheses are identification codes in the figure.

(S0)S変数.パスを読取る。   (S0) S variable. Read the path.

(S1)このパスに含まれるファイル名の拡張子が"cgi"であればステップS2へ進み、そうでなければステップS3へ進む。   (S1) If the extension of the file name included in this path is “cgi”, the process proceeds to step S2, and if not, the process proceeds to step S3.

(S2)S識別子を引数としてWebアプリケーション35を呼出し、図3の処理を終了する。   (S2) The Web application 35 is called with the S identifier as an argument, and the processing of FIG.

(S3)ステップS0で読取ったパスが、コンフィグレーションファイル42内のフォースファイル項目に記述された、ファイル名に一致し又はディレクトリのパス以下のものである場合には、ステップS2へ進み、そうでなければステップS4へ進む。すなわち、リクエスト対象を示すパスが所定パスであればCGIプログラムのうち、後述のget.cgiに対するリクエストであるとみなす。   (S3) If the path read in step S0 matches the file name described in the force file item in the configuration file 42 or is less than or equal to the directory path, the process proceeds to step S2. If not, the process proceeds to step S4. That is, if the path indicating the request target is a predetermined path, it is regarded as a request for get.cgi described later in the CGI program.

(S4)S識別子を引数として静的リソース処理部343を呼び出す。   (S4) The static resource processing unit 343 is called with the S identifier as an argument.

静的リソース処理部343はこれに応答して、S変数.パスで識別されるファイルの内容を静的リソース37からDRAM14上に読出し、その識別子を、対応するHTTP処理スレッド341に引き渡す。HTTP処理スレッド341はこれに応答して、このファイルの内容にリスポンスヘッダを付加し、リスポンスメッセージとして、OS30及びNIC18を介しWebクライアントマシーン20へこのメッセージを送信する。   In response, the static resource processing unit 343 responds to the S variable. The contents of the file identified by the path are read from the static resource 37 onto the DRAM 14, and the identifier is delivered to the corresponding HTTP processing thread 341. In response to this, the HTTP processing thread 341 adds a response header to the contents of this file and transmits this message to the Web client machine 20 via the OS 30 and the NIC 18 as a response message.

本実施例1によれば、処理粗振分部342において、クライアントからのリクエストURIに含まれるパスがコンフィグレーションファイル42内のフォースファイル項目に記述された仮想ファイルパスと一致し又は仮想ディレクトリパス以下のものと判定されれば、Webアプリケーション35に制御が移るので、Webアプリケーション35に制御を移すためのプログラムファイルパスを省略でき、これにより37及び38の記述を簡単化することができるという効果を奏する。   According to the first embodiment, in the processing rough distribution unit 342, the path included in the request URI from the client matches the virtual file path described in the force file item in the configuration file 42, or less than the virtual directory path. If it is determined, the control is transferred to the Web application 35. Therefore, the program file path for transferring control to the Web application 35 can be omitted, and the description of 37 and 38 can be simplified. Play.

次に、処理粗振分部342によりWebアプリケーション35が呼び出された場合の処理を説明する。図2は、主にWebアプリケーション35の構成を示す機能ブロック図である。   Next, a process when the web application 35 is called by the process rough distribution unit 342 will be described. FIG. 2 is a functional block diagram mainly showing the configuration of the Web application 35.

この呼出は、Webアプリケーション35の処理細振分部350に対して行われる。図4は、処理細振分部350による処理を示すフローチャートである。   This call is made to the processing subdivision unit 350 of the Web application 35. FIG. 4 is a flowchart showing the processing by the processing fine distribution unit 350.

ここで、従来ではCGIプログラムのそれぞれがプロセスとして起動されていたが、本実施例1では、CGIプログラムのそれぞれを1つのプロセスの中の関数(サブルーチン)として起動することにより、プロセス間通信による遅延を防止するとともに、複数のCGIプログラムでリソースを共有して、全体として必要なメモリサイズを削減している。すなわち、CGI方式の利点を有効利用するとともに、その欠点を補っている。   Conventionally, each of the CGI programs is started as a process. However, in the first embodiment, each CGI program is started as a function (subroutine) in one process, thereby causing a delay due to interprocess communication. In addition, resources are shared by a plurality of CGI programs to reduce the necessary memory size as a whole. In other words, the advantages of the CGI method are effectively used and the drawbacks are compensated.

(S10、S11)S変数.パスに含まれるファイル名本体(ファイル名から.cgiを除いた部分)が"login"であればS識別子を引数として認証制御部351を呼び出し、図4の処理を終了する。   (S10, S11) S variable. If the file name main body included in the path (the part obtained by removing .cgi from the file name) is “login”, the authentication control unit 351 is called with the S identifier as an argument, and the process of FIG. 4 ends.

(S12、S13)該ファイル名本体が"get"であればS識別子を引数としてGET処理制御部352を呼び出し、図4の処理を終了する。   (S12, S13) If the file name body is “get”, the GET process control unit 352 is called with the S identifier as an argument, and the process of FIG. 4 is terminated.

(S14、S15)該ファイル名本体が"set"であればS識別子を引数としてSET処理制御部353を呼び出し、図4の処理を終了する。   (S14, S15) If the file name body is “set”, the SET process control unit 353 is called with the S identifier as an argument, and the process of FIG. 4 is terminated.

(S16、S17)該ファイル名本体が"image"であればS識別子を引数としてイメージ処理制御部354を呼び出し、図4の処理を終了し、そうでなければ、すなわちフォースファイルであれば、ステップS13へ進む。   (S16, S17) If the file name body is “image”, the image processing control unit 354 is called with the S identifier as an argument, and the processing of FIG. 4 is terminated. Proceed to S13.

図2に戻って、GET処理制御部352は、S変数.クエリ文字列に含まれるパスを引数としてHTMLトランスレータ355を呼び出す。例えば、リクエスト行がGET /cgi-bin/get.cgi?htmfile=/start/start.html HTTP/1.1である場合、S変数.クエリ文字列はhtmfile=/start/start.htmlであり、このパス/start/start.htmlは、HTMLテンプレートファイルのパスである。HTMLトランスレータ355はこの呼出に応答して、図5(A)に示す処理を行う。   Returning to FIG. 2, the GET process control unit 352 determines whether the S variable. The HTML translator 355 is called with the path included in the query character string as an argument. For example, if the request line is GET /cgi-bin/get.cgi?htmfile=/start/start.html HTTP / 1.1, the S variable. The query character string is htmfile = / start / start.html, and this path /start/start.html is the path of the HTML template file. In response to this call, the HTML translator 355 performs the processing shown in FIG.

ここで、HTMLテンプレートファイル38の各々について、図5(B)に示す如く、そのパスとそのファイルサイズに対応したバイト数とを対応させたバッファサイズテーブル39が予め作成されている。このバイト数は例えば、ファイルサイズ自体、ファイルサイズの1.1倍又はファイルサイズに256バイトを加えたものなどである。   Here, for each HTML template file 38, as shown in FIG. 5B, a buffer size table 39 in which the path and the number of bytes corresponding to the file size are associated with each other is created in advance. This number of bytes is, for example, the file size itself, 1.1 times the file size or 256 bytes added to the file size.

(S20)バッファサイズテーブル39から、指定されたテンプレートファイルに対応したバイト数を読取る。   (S20) The number of bytes corresponding to the designated template file is read from the buffer size table 39.

(S21)図1に示すOS30のメモリマネージャ302を介し、DRAM14上のこのバイト数の一時記憶領域を獲得する。   (S21) A temporary storage area of this number of bytes on the DRAM 14 is acquired via the memory manager 302 of the OS 30 shown in FIG.

(S22)テンプレートファイルから、ステートメント行カウンタSLCが示す行のステートメントを読み込み、このカウンタSLCを1だけインクリメントする。   (S22) The statement on the line indicated by the statement line counter SLC is read from the template file, and this counter SLC is incremented by one.

(S23)ステップS22で読み込むべきステートメントが存在しなかった場合にはステップS29へ進み、そうでなければステップS24へ進む。   (S23) If there is no statement to be read in step S22, the process proceeds to step S29; otherwise, the process proceeds to step S24.

(S24)ステートメントがディレクティブ(HTMLトランスレータ355に対する指示文)であれば、後述のようにその処理を行う。   (S24) If the statement is a directive (instruction for the HTML translator 355), the processing is performed as described later.

(S25〜S28)ステートメントがコンテキスト・トークン(以下、単にトークンと称す。)であれば、後述のようにこれを対応する文字列で置換したものを該一時記憶領域に書き込み、そうでなければステートメントをそのまま該一時記憶領域に書き込む。次に、ステップS22へ戻る。   (S25 to S28) If the statement is a context token (hereinafter simply referred to as a token), the statement is replaced with a corresponding character string as described later, and the statement is written to the temporary storage area. Are written in the temporary storage area as they are. Next, the process returns to step S22.

ステップS25、S27又はS28においては、次の処理も行われる。   In step S25, S27 or S28, the following processing is also performed.

(S2A、S2B)該一時記憶領域に書き込む際に、該一時記憶領域が不足して書き込めない場合には、メモリマネージャ302を介し、ステップS20で取得したサイズの所定%、例えば10%だけ、一時記憶領域を拡大させる。   (S2A, S2B) When writing to the temporary storage area, if the temporary storage area is insufficient and cannot be written, the memory manager 302 is used to temporarily store a predetermined percentage of the size acquired in step S20, for example, 10%. Increase the storage area.

図6は、図5(A)のステップS27の詳細を示すフローチャートである。   FIG. 6 is a flowchart showing details of step S27 in FIG.

(S30)トークンからトークンボディを抽出する。ここにトークンとは例えば、#l_NetworkSetting#又は#f_GetIPAddress#のように、トークン開始記号#とトークン終了記号#とを含む文字列である。トークンのうち、#と#の間の文字列を、トークンボディと称す。トークンボディの先頭部分は、トークンの種類を示しており、先頭2文字がl_、f_である場合、それぞれ言語トークン、関数トークンであることを示し、先頭3文字がmsgである場合、メッセージ・トークンであることを示す。   (S30) A token body is extracted from the token. Here, the token is a character string including a token start symbol # and a token end symbol #, such as # l_NetworkSetting # or # f_GetIPAddress #. A character string between # and # in the token is called a token body. The first part of the token body indicates the type of token. When the first two characters are l_ and f_, it indicates a language token and a function token, respectively. When the first three characters are msg, Indicates a token.

(S31)トークンボディの先頭2文字がl_であればステップS32へ進みf_であればステップS36へ進み、先頭3文字がmsgであればステップS39へ進む。   (S31) If the first two characters of the token body are l_, the process proceeds to step S32. If f_, the process proceeds to step S36, and if the first three characters are msg, the process proceeds to step S39.

(S32)トークン名をハッシュ値に変換する。ここにトークン名とは、言語トークンにおけるトークンボディ中の3文字目以降の文字列である。   (S32) The token name is converted into a hash value. Here, the token name is a character string after the third character in the token body in the language token.

言語テーブルファイル40は、各国語の言語テーブルファイルを有し、各テーブルは、トークン名のハッシュ値とトークン名の値である文字列とが対応付けられている。   The language table file 40 has a language table file for each national language, and each table associates a hash value of a token name with a character string that is a value of the token name.

(S33)ステップS32で変換されたハッシュ値をキーとして、指定された言語テーブルファイルの内容を検索し、対応する値を得る。例えば、トークン名がNetworkSetingの場合、指定された言語が英語であれば"Network Setting" が得られ、日本語であれば"ネットワーク設定"が得られる。   (S33) Using the hash value converted in step S32 as a key, the contents of the designated language table file are searched to obtain a corresponding value. For example, if the token name is NetworkSeting, “Network Setting” is obtained if the specified language is English, and “Network Setting” is obtained if the specified language is Japanese.

指定された言語は、最初は既定値であり、後述のようにして変更され、langクッキーに保持され、lang値により言語テーブルファイル40内の1つが指定される。例えば、lang=0は英語を示し、lang=2は日本語を示す。   The designated language is initially a default value, and is changed as described later, held in a lang cookie, and one in the language table file 40 is designated by the lang value. For example, lang = 0 indicates English and lang = 2 indicates Japanese.

(S34)トークンをその値で変換する。例えばlang=0で言語トークンが#l_NetworkSetting#である場合、このトークンが"Network Setting"に変換される。   (S34) The token is converted with the value. For example, when lang = 0 and the language token is # l_NetworkSetting #, this token is converted to “Network Setting”.

ここで、処理関数群356内の各関数の引数及び返り値の形式は統一されており、任意の関数funcは、C言語でfunc(chr **IN,chr ***OUT)と表される。引数IN及び返り値OUTはともに文字列の1次元動的配列である。INよりもOUTの方に記号*が1つ多く付加されているのは、返り値OUTの配列要素数を関数側で変更できるようにするため、すなわち関数側で動的配列にすることができるようにするためである。   Here, the format of the argument and return value of each function in the processing function group 356 is unified, and an arbitrary function func is expressed as func (chr ** IN, chr *** OUT) in C language. . Both the argument IN and the return value OUT are one-dimensional dynamic arrays of character strings. The reason that one more symbol * is added to OUT than to IN is to allow the function side to change the number of array elements in the return value OUT, that is, it can be a dynamic array on the function side. It is for doing so.

関数トークンの場合にはこれがその関数名の関数の返り値*OUT[0]に変換される。メッセージ・トークン#msgX#(Xは自然数)の場合、これが関数の返り値*OUT[X]に変換される。   In the case of a function token, this is converted to the return value * OUT [0] of the function with that function name. In the case of message token # msgX # (X is a natural number), this is converted to the return value * OUT [X] of the function.

(S35)トークンの値にはトークンを含めることができ、この値にトークンが含まれている場合にはステップS30へ戻り、そうでなければ図6の処理を終了する。   (S35) A token can be included in the token value. If this value includes a token, the process returns to step S30; otherwise, the process of FIG. 6 ends.

(S36、S37)関数トークンに引数が含まれていれば、引数を抽出する。   (S36, S37) If an argument is included in the function token, the argument is extracted.

引数は、クエリ文字列と同じ形式で記述され、デリミタとしての&により複数の引数を関数トークンに含むことができる。関数トークンにおけるトークンボディの3文字目以降&まで(&が無い場合は最後まで)を関数名と称す。例えば、関数トークン#f_func&arg1=XXX&arg2=YYY&arg3=ZZZ#は、関数名がfunc、引数名arg1の値がXXX、引数名arg2の値がYYY、引数名arg3の値がZZZであることを示す。一般に、引き数名argXの値は引数IN[X]に代入される。   The argument is described in the same format as the query string, and multiple arguments can be included in the function token by & as a delimiter. The third and subsequent characters of the token body in a function token up to & (or the end if &) is called the function name. For example, the function token # f_func & arg1 = XXX & arg2 = YYY & arg3 = ZZZ # indicates that the function name is func, the argument name arg1 is XXX, the argument name arg2 is YYY, and the argument name arg3 is ZZZ. In general, the value of the argument name argX is assigned to the argument IN [X].

(S38)関数トークンに含まれる関数名の関数に、関数トークンに含まれる引数を渡して、この関数を呼び出す。次にステップS34へ進む。   (S38) An argument included in the function token is passed to the function having the function name included in the function token, and this function is called. Next, the process proceeds to step S34.

この関数は、図2の処理関数群356に含まれている。関数は、DBMS36を介してデータベース41内のデータを読出し又は変更することができる。このデータには、画像形成装置の各種設定値やトナー残量、印刷枚数などの状態が含まれている。   This function is included in the processing function group 356 of FIG. The function can read or change data in the database 41 via the DBMS 36. This data includes various setting values of the image forming apparatus, the remaining amount of toner, the number of printed sheets, and the like.

(S39)メッセージ・トークン#msgX#からインデックスX(X≧0)を取り出し、ステップS34へ進む。   (S39) The index X (X ≧ 0) is extracted from the message token # msgX #, and the process proceeds to step S34.

例えば、関数トークン#f_getDHCPMode#で識別される関数getDHCPModeが*OUT[0]="#l_dhcp_on#"を返し、ステップS34で#f_getDHCPMode#が#l_dhcp_on#で置換され、ステップS35からステップS30へ戻る。lang=0の場合、ステップS33で"DHCP ON"が取得され、ステップS34で#l_dhcp_on#が"DHCP ON"で置換され、lang=2の場合、ステップS33で"DHCP オン"が取得され、ステップS34で#l_dhcp_on#が"DHCP オン"で置換される。   For example, the function getDHCPMode identified by the function token # f_getDHCPMode # returns * OUT [0] = “# l_dhcp_on #”, # f_getDHCPMode # is replaced with # l_dhcp_on # in step S34, and the process returns from step S35 to step S30. If lang = 0, "DHCP ON" is obtained in step S33, # l_dhcp_on # is replaced with "DHCP ON" in step S34, and if lang = 2, "DHCP on" is obtained in step S33. In S34, # l_dhcp_on # is replaced with “DHCP on”.

したがって、トークンを変数と言語の両方に応じて適当に変換することができるという効果を奏する。   Therefore, the token can be appropriately converted according to both the variable and the language.

他の例として、lang=2の場合、言語トークン#l_jobnum_msg#が"現在処理中のジョブは#f_getJobNum#個です。"に変換され、さらに、関数トークン#f_getJobNum#が*OUT[0]="10"に変換され、結果として、言語トークンl_jobnum_msg#が"現在処理中のジョブは10個です。"に変換される。lang=0の場合、言語トークン#l_jobnum_msg#が"#f_getJobNum# jobs are being processed"に変換され、さらに、関数トークン#f_getJobNum#が*OUT[0]="10"に変換され、結果として、言語トークンl_jobnum_msg#が"10 jobs are being processed"に変換される。   As another example, when lang = 2, the language token # l_jobnum_msg # is converted to "# f_getJobNum # jobs currently being processed." And the function token # f_getJobNum # is * OUT [0] = " As a result, the language token l_jobnum_msg # is converted to "10 jobs currently being processed." If lang = 0, the language token # l_jobnum_msg # is converted to "# f_getJobNum # jobs are being processed", and the function token # f_getJobNum # is converted to * OUT [0] = "10", resulting in the language The token l_jobnum_msg # is converted to "10 jobs are being processed".

したがって、英語と日本語で文章中の変数の値"10" の位置が異なっても対応できるという効果を奏する。   Therefore, even if the position of the variable value “10” in the sentence is different between English and Japanese, it is possible to cope with it.

本実施例1によれば、Webアプリケーション35に含まれる複数の関数の返り値の形式が統一されているので、Webアプリケーションの全体構成を簡単化することができるとともにチームによるソフトウエア設計が容易になるという効果を奏し、機能を拡張又は変更した製品の開発期間短縮に寄与するところが大きい。   According to the first embodiment, since the format of the return values of a plurality of functions included in the Web application 35 is unified, the entire configuration of the Web application can be simplified and software design by the team can be easily performed. This has the effect of contributing to shortening the development period of products whose functions have been expanded or changed.

また、複数の関数のそれぞれが関数側で返り値を複数にすることができるので、1つの関数を実行して得られる情報を複数箇所でそれぞれ異なる目的に用いることができ、複雑な構成を簡単化することができるという効果を奏する。   In addition, since each of a plurality of functions can have a plurality of return values on the function side, the information obtained by executing one function can be used for different purposes at a plurality of locations, and a complicated configuration can be simplified. There is an effect that can be made.

DBMS36は主に、設定値の変更に対する制限を課すものであり、値の範囲を制限したり、同時に設定値を変更できるクライアント数を一人に制限する。   The DBMS 36 mainly imposes a restriction on the change of the setting value, and restricts the range of the value or at the same time restricts the number of clients that can change the setting value to one person.

図14(A)及び(B)は、Webクライアントマシーン20と画像形成装置10との間のメッセージ送受概略を示すシーケンス図である。   FIGS. 14A and 14B are sequence diagrams showing an outline of message transmission / reception between the Web client machine 20 and the image forming apparatus 10.

図14(A)において、Webクライアントマシーン20のブラウザ上から画像形成装置10のサイトのトップ頁を要求し、画像形成装置10がこれに応答して、Webクライアントマシーン20のブラウザ上に例えば図9(A)に示すような画面が表示される。この画面のHTMLファイルは、言語選択のフォームと、印刷画面又はFAX送信画面への移動を指示するフォームとを有している。   In FIG. 14A, the top page of the site of the image forming apparatus 10 is requested from the browser of the Web client machine 20, and the image forming apparatus 10 responds to this by, for example, displaying the top page of the Web client machine 20 on the browser of FIG. A screen as shown in (A) is displayed. The HTML file on this screen has a language selection form and a form for instructing movement to a print screen or FAX transmission screen.

この言語選択フォームにおいて、ユーザがプルダウンメニュー中の項目(言語)を選択し、Goボタンを押下すると、選択した言語の情報を含むリクエストメッセージが画像形成装置10へ送信され、図2において、処理細振分部350からGET処理制御部352へ処理が移り、次いでHTMLトランスレータ355により、トップページのテンプレートファイルに含まれる言語トークンが、選択した言語の文字列に変換され、これがGET処理制御部352に返される。GET処理制御部352は、このリスポンスボディに、選択した言語のクッキーフィールドを付加し、HTTP処理スレッド341を介し残りのリスポンスヘッダを付加して、リクエストメッセージを完成させる。HTTP処理スレッド341は、このリスポンスメッセージを、OS30及びNIC18を介して、Webクライアントマシーン20へ送信する。これにより、Webクライアントマシーン20のブラウザには、選択した言語で図9(A)に示す内容が表示される。このHTTP処理スレッド341は、この送信後に消滅する。   In this language selection form, when the user selects an item (language) in the pull-down menu and presses the Go button, a request message including information on the selected language is transmitted to the image forming apparatus 10, and in FIG. Processing moves from the distribution unit 350 to the GET processing control unit 352, and then the HTML translator 355 converts the language token included in the template file on the top page into a character string of the selected language, which is then transferred to the GET processing control unit 352. returned. The GET processing control unit 352 adds a cookie field of the selected language to this response body, adds the remaining response header via the HTTP processing thread 341, and completes the request message. The HTTP processing thread 341 transmits this response message to the Web client machine 20 via the OS 30 and the NIC 18. As a result, the content shown in FIG. 9A is displayed in the selected language on the browser of the Web client machine 20. The HTTP processing thread 341 disappears after this transmission.

Webクライアントマシーン20から画像形成装置10へ送信されるこれ以降のリクエストメッセージには、選択した言語を示すクッキーがリクエストヘッダに含まれるので、ブラウザに表示される文字列の言語が、選択したものとなる。   In subsequent request messages transmitted from the Web client machine 20 to the image forming apparatus 10, a cookie indicating the selected language is included in the request header, so that the language of the character string displayed on the browser is selected. Become.

上記画面移動のフォームにおいて、ユーザがFAX送信画面のラジオボタンを選択し、移動ボタンを押下すると、リクエストURIにget.cgiを含むリクエストメッセージが画像形成装置10へ送信され、上記同様にして画像形成装置10によりリスポンスメッセージが生成され、これがWebクライアントマシーン20に送信されて、ブラウザ上に図9(B)に示すような画面が表示される。   In the screen movement form, when the user selects a radio button on the FAX transmission screen and presses the movement button, a request message including get.cgi in the request URI is transmitted to the image forming apparatus 10, and image formation is performed in the same manner as described above. A response message is generated by the device 10 and transmitted to the Web client machine 20, and a screen as shown in FIG. 9B is displayed on the browser.

ユーザが、プルダウンメニューでFAX送信の宛先を選択し、次いで参照ボタンをクリックしてブラウザに対しファイル選択ダイアログを表示させ、Webクライアントマシーン20のハードディスクに格納されているファイルを選択して送信ファイルを特定し、FAX送信ボタンを押下すると、選択した宛先と送信ファイルの内容とを含むリクエストメッセージが画像形成装置10へ送信される。   The user selects a FAX transmission destination from the pull-down menu, and then clicks the browse button to display a file selection dialog for the browser, selects a file stored on the hard disk of the Web client machine 20 and selects a transmission file. When specified and the FAX transmission button is pressed, a request message including the selected destination and the content of the transmission file is transmitted to the image forming apparatus 10.

このリクエストメッセージに含まれるリクエスト行は例えば、POST /cgi-bin/image.cgi HTTP/1.1であり、ファイル名がimage.cgiであるので、図2の処理細振分部350からイメージ処理制御部354へ制御が移る。このメッセージのリクエストボディに含まれるクエリ文字列は例えば、func=sendFax&arg0=sendfile.pdf&arg1=1&okhtmfile=OK.html&failhtmfile=NG.htmlであり、これは上記S変数.クエリ文字列に格納されている。イメージ処理制御部354は、S識別子をイメージ処理部357へ渡し、イメージ処理部357はこれに基づいて、IN[0]="sendfile.pdf",IN[1]="1"を引数として処理関数群356中の関数sendFaxを呼出す。関数sendFaxでは、処理関数群356内の設定値取得関数を介して、データベース41から又は後述のクッキーから、FAX送信に使用する設定値を取得する。この点は、FAX送信以外のイメージ処理についても同様である。関数sendFaxは、取得した設定値を用い、送信ファイルsendfile.pdfの内容をFAX送信用の画像データに変換し、アドレス帳内の1番目の宛先へFAXを送信する。   The request line included in this request message is, for example, POST / cgi-bin / image.cgi HTTP / 1.1, and the file name is image.cgi, so the processing sub-distribution unit 350 to the image processing control unit in FIG. Control transfers to 354. The query character string included in the request body of this message is, for example, func = sendFax & arg0 = sendfile.pdf & arg1 = 1 & okhtmfile = OK.html & failhtmfile = NG.html, which is the above S variable. Stored in the query string. The image processing control unit 354 passes the S identifier to the image processing unit 357, and based on this, the image processing unit 357 processes IN [0] = "sendfile.pdf", IN [1] = "1" as arguments. The function sendFax in the function group 356 is called. In the function sendFax, the setting value used for FAX transmission is acquired from the database 41 or from a cookie described later, via the setting value acquisition function in the processing function group 356. This also applies to image processing other than FAX transmission. The function sendFax converts the content of the transmission file sendfile.pdf into image data for FAX transmission using the acquired setting value, and transmits the FAX to the first destination in the address book.

上記送信が正常に行われたか否かの情報は、関数sendFaxにおいて返り値*OUT[0]に代入され、これがイメージ処理部357を介してイメージ処理制御部354に返される。イメージ処理制御部354は、上記クエリ文字列に基づき、*OUT[0]="OK"であれば、テンプレートファイルOK.htmlのパスをGET処理制御部352に与えてOK.htmファイルを生成させ、*OUT[0]="NG"であれば、テンプレートファイルNG.htmlのパスをGET処理制御部352に与えてNG.htmファイルを生成させる。本実施例では、テンプレートファイルの拡張子をhtmlとし、これに基づいて作成されたファイルの拡張子をhtmとしている。   Information indicating whether or not the transmission has been normally performed is substituted into a return value * OUT [0] in the function sendFax, and this is returned to the image processing control unit 354 via the image processing unit 357. Based on the query character string, the image processing control unit 354 gives the path of the template file OK.html to the GET processing control unit 352 to generate an OK.htm file if * OUT [0] = "OK". If * OUT [0] = "NG", the path of the template file NG.html is given to the GET processing control unit 352 to generate the NG.htm file. In the present embodiment, the extension of the template file is html, and the extension of the file created based on this is htm.

例えば図11(A)に示す如く、テンプレートファイルOK.htmlにはメッセージ・トークン#msg1#が含まれ、図11(C)に示す如く、テンプレートファイルNG.htmlにはメッセージ・トークン#msg1#及び#msg2#が含まれており、メッセージ・トークン#msg1#及び#msg2#はHTMLトランスレータ355による図6のステップS39及びS34の処理により、それぞれ*OUT[1]及び*OUT[2]で置換される。これにより、テンプレートファイルOK.html及びNG.htmlからそれぞれ図11(B)及び(D)に示すようなHTMLファイルOK.htm及びNG.htmがGET処理制御部352により生成される。いずれの場合も、GET処理制御部352及びHTTP処理スレッド341を介しリスポンスヘッダがこれに付加されて、Webクライアントマシーン20へ送信される。   For example, as shown in FIG. 11A, the template file OK.html includes a message token # msg1 #, and as shown in FIG. 11C, the template file NG.html has a message token # msg1 # and # msg2 # is included, and message tokens # msg1 # and # msg2 # are replaced with * OUT [1] and * OUT [2], respectively, by the processing of steps S39 and S34 in FIG. 6 by the HTML translator 355. The Thereby, HTML files OK.htm and NG.htm as shown in FIGS. 11B and 11D are generated by the GET processing control unit 352 from the template files OK.html and NG.html, respectively. In either case, a response header is added to the request via the GET processing control unit 352 and the HTTP processing thread 341 and transmitted to the Web client machine 20.

GET処理制御部352はまた、設定に応じて、送信完了又は送信失敗をユーザに通知するため、HTMLファイルOK.htm又はNG.htmの内容の電子メールを作成して、メール送信サーバ33のメールボックスへ格納させる(図10参照)。   The GET processing control unit 352 also creates an e-mail with the contents of the HTML file OK.htm or NG.htm to notify the user of transmission completion or transmission failure according to the setting, and sends the e-mail of the mail transmission server 33. It is stored in a box (see FIG. 10).

本実施例1によれば、処理関数群356内の各関数の返り値の形式が上述のように統一されているので、同一テンプレートファイルOK.html及びNG.htmlに基づき、FAX送信結果以外のイメージ処理結果又は設定値変更結果を示すリスポンスメッセージボディも作成することができ、構成が簡単になる。   According to the first embodiment, since the format of the return value of each function in the processing function group 356 is unified as described above, based on the same template file OK.html and NG.html, other than the FAX transmission result A response message body indicating an image processing result or a set value change result can also be created, which simplifies the configuration.

また、処理の種類毎に異なるテンプレートファイルを用いても、関数の返り値とメッセージ・トークンとが統一的に対応づけられているので、例えば図11(E)に示すように、処理結果のテンプレートファイルを容易に作成できるという効果を奏する。図11(F)は、図11(E)に示すテンプレートファイルOK.htmlに基づいて作成されたHTMLファイルOK.htmを示す。   Even if different template files are used for each type of processing, the return value of the function and the message token are associated with each other in a unified manner. For example, as shown in FIG. There is an effect that a file can be easily created. FIG. 11F shows an HTML file OK.htm created based on the template file OK.html shown in FIG.

図9(B)に戻って、プルダウンメニューに含まれる宛先の数は、後述する図9(C)画面を用いてユーザが追加又は削除することにより変化する。このような変化に対応して、図12(A)に示すようなテンプレートファイルが用いられる。このテンプレートファイルには、forディレクティブ<!-- for f_getCountOfAddress -->とend_forディレクティブ<!-- end_for -->とが含まれる。ディレクティブは、その開始記号<!--及び終了記号-->で識別される。   Returning to FIG. 9B, the number of destinations included in the pull-down menu changes as the user adds or deletes it using the screen shown in FIG. Corresponding to such a change, a template file as shown in FIG. This template file includes a for directive <!-For f_getCountOfAddress-> and an end_for directive <!-End_for->. A directive is identified by its start symbol <!-And end symbol->.

forディレクティブとend_forディレクティブとの間に配置されたステートメントに対する処理は、forディレクティブに含まれる繰り返し回数f_getCountOfAddressだけ繰り返される。この繰り返し回数は、定数であってもよいが、この例では、トークン識別記号#を省略した関数トークンf_getCountOfAddressが変数として用いられている。この関数トークンで識別される関数getCountOfAddressにより、アドレス帳に含まれる宛先の数が取得されて、その返り値*OUT[0]で関数トークンが置換される。   The processing for the statement arranged between the for directive and the end_for directive is repeated by the number of repetitions f_getCountOfAddress included in the for directive. The number of repetitions may be a constant, but in this example, a function token f_getCountOfAddress in which the token identification symbol # is omitted is used as a variable. The function getCountOfAddress identified by this function token obtains the number of destinations included in the address book, and the function token is replaced with the return value * OUT [0].

オプションタグに含まれるトークン"#f_m_Count&arg0=0#"中のf_m_は、関数Countが多価関数であることを示している。この関数は、上述の引数及び返り値の形式が統一された関数と同一であるが、forディレクティブでの繰り返しが何回目であるかを示す内部カウンタiの値により、関数の取り扱いが異なる。カウンタiが初期値0(繰り返し1回目)である場合のみこの関数が呼び出され、i≧0の各iについて多価関数トークン"#f_m_Count&arg0=0#"が*OUT[i]で置換される。これらのことは、アドレス帳内のi番目の宛先を*OUT[i]に代入する多価関数トークン#f_m_getAddress#についても同様である。   F_m_ in the token “# f_m_Count & arg0 = 0 #” included in the option tag indicates that the function Count is a multivalent function. This function is the same as the above-mentioned function in which the argument and return value formats are unified, but the function is handled differently depending on the value of the internal counter i indicating the number of repetitions in the for directive. This function is called only when the counter i is the initial value 0 (first repetition), and the multi-function token “# f_m_Count & arg0 = 0 #” is replaced with * OUT [i] for each i for i ≧ 0. The same applies to the multivalent function token # f_m_getAddress # that substitutes the i-th destination in the address book for * OUT [i].

ディレクティブは、上述の図5(A)におけるステップS25で処理される。図7は、このステップS25での、主にforディレクティブに対する処理の詳細を示すフローチャートである。   The directive is processed in step S25 in FIG. FIG. 7 is a flowchart showing details of processing mainly for the for directive in step S25.

(S40)forディレクティブ(for DIR)であればステップS41へ進み、そうでなければステップS4Cへ進む。   (S40) If it is a for directive (for DIR), the process proceeds to step S41; otherwise, the process proceeds to step S4C.

(S41)繰り返しカウンタiに初期値0を代入し、また、処理対象のステートメントがテンプレートファイル内の何行目であるかを示す行カウンタSLCの値をSLC0に代入して保存する。   (S41) The initial value 0 is assigned to the repetition counter i, and the value of the row counter SLC indicating the number of rows in the template file of the processing target statement is assigned to SLC0 and saved.

(S42)テンプレートファイルから、カウンタSLCが示す行のステートメントを読み込み、この行カウンタを1だけインクリメントする。   (S42) The statement of the line indicated by the counter SLC is read from the template file, and this line counter is incremented by one.

(S43)このステートメントに多価関数トークンが含まれていればステップS44へ進み、そうでなければステップS47へ進む。   (S43) If a multivalent function token is included in this statement, the process proceeds to step S44, and if not, the process proceeds to step S47.

(S44、S45)i=0のときのみ、処理関数群356内の、多価関数トークンで識別される関数を呼び出す。この際、多価関数トークンに引数が含まれていればこれを抽出してこの関数に引き渡す。例えば多価関数トークンが"#f_m_Count&arg0=0#"である場合、IN[0]="0"を引き渡して関数Countを呼び出す。関数Countの*OUT[i]は、in[0]を数値に変換しこれに値iを加えたものを文字型に変換したものである。   (S44, S45) Only when i = 0, the function identified by the multivalent function token in the processing function group 356 is called. At this time, if the multivalent function token includes an argument, it is extracted and delivered to this function. For example, when the multivalent function token is “# f_m_Count & arg0 = 0 #”, IN [0] = “0” is delivered and the function Count is called. The function * OUT [i] is obtained by converting in [0] into a numerical value and adding the value i to a character type.

(S46)多価関数トークンを*OUT[i]で置換し、ステップS48へ進む。   (S46) The multivalent function token is replaced with * OUT [i], and the process proceeds to step S48.

(S47)ステートメントに応じた処理を行う。   (S47) Perform processing according to the statement.

(S48)end_forディレクティブであればステップS49へ進み、そうでなければステップS42へ戻る。   (S48) If it is an end_for directive, the process proceeds to step S49; otherwise, the process returns to step S42.

(S49)繰り返しカウンタiを1だけインクリメントする。   (S49) The repeat counter i is incremented by 1.

(S4A)iの値がforディレクティブ内で指定された値imaxに等しければ図7の処理を終了し、そうでなければステップS4Bへ進む。   (S4A) If the value of i is equal to the value imax specified in the for directive, the process of FIG. 7 is terminated, otherwise the process proceeds to step S4B.

(S4B)ステートメント行カウンタSLCにSLC0を代入し、ステップS42へ戻る。   (S4B) SLC0 is assigned to the statement line counter SLC, and the process returns to step S42.

(S4C)他のディレクティブに対する処理を行って図7の処理を終了する。   (S4C) Processing for other directives is performed, and the processing of FIG. 7 ends.

このような処理を含む図5(A)の処理により、図12(A)に示すテンプレートファイルに基づいて、図12(B)に示すようなHTMLファイルがリスポンスボディとしてHTMLトランスレータ355により生成される。   The HTML file as shown in FIG. 12B is generated as a response body by the HTML translator 355 based on the template file shown in FIG. .

図12(A)と図12(B)とを比べると、簡単化されたテンプレートファイルで任意の項目数のプルダウンメニューを作成可能であることが明らかである。上記forディレクティブは、C言語等の命令文で用いられる他のwhile文やdo−loopなどの制御ループにも同様に適用可能である。   Comparing FIG. 12A and FIG. 12B, it is clear that a pull-down menu having an arbitrary number of items can be created with a simplified template file. The for directive is also applicable to control loops such as other while statements and do-loops used in command statements such as C language.

次に、SET処理の具体例として、アドレス帳内の項目(宛先)を追加、変更又は削除する処理を説明する。   Next, as a specific example of the SET process, a process for adding, changing, or deleting an item (destination) in the address book will be described.

図14(B)は、図9(A)の画面から図9(B)の画面へ移った後、「アドレス帳を開く」ボタンをクリックして図9(C)の画面へ移り、編集処理を行い、これが成功した場合を示す。   In FIG. 14B, after moving from the screen of FIG. 9A to the screen of FIG. 9B, the “Open Address Book” button is clicked to move to the screen of FIG. To show when this is successful.

「アドレス帳を開く」ボタンをクリックして得られるリクエストメッセージに対応したリスポンスメッセージは、上述の図9(A)で「移動」ボタンをクリックして得られるリクエストメッセージに対応したリスポンスメッセージと同様にして作成される。このメッセージのリスポンスボディは、図13(A)に示すテンプレートファイルに基づいてHTMLトランスレータ355により生成され、例えば図13(B)に示すものである。図13(A)中のforディレクティブ及び多価関数トークンは、図12(A)中のものと同様である。   The response message corresponding to the request message obtained by clicking the “open address book” button is the same as the response message corresponding to the request message obtained by clicking the “move” button in FIG. Created. The response body of this message is generated by the HTML translator 355 based on the template file shown in FIG. 13A, and is shown in FIG. 13B, for example. The for directive and the multivalent function token in FIG. 13A are the same as those in FIG.

図9(C)において、リストボックス内の項目をクリックして選択すると、この項目が反転表示されるとともに、クライアンドサイドのオンクリックイベントハンドラが呼び出されて、選択した項目が宛先ボックス内に表示される。ユーザが、この状態で「削除」のラジオボタンを選択し、または宛先ボックス内の文字列を変更して「変更」のラジオボタンを選択し、実行ボタンを押下すると、宛先ボックス内のデータと、選択した「変更」又は「削除」を示すデータと、図13(B)に示すFORMタグの属性値とを含むリクエストメッセージが、画像形成装置10へ送信される。   In FIG. 9C, when an item in the list box is clicked and selected, this item is highlighted and the client side on-click event handler is called to display the selected item in the destination box. Is done. When the user selects the “Delete” radio button in this state, or changes the character string in the destination box and selects the “Change” radio button and presses the execute button, the data in the destination box A request message including the selected data indicating “change” or “deletion” and the attribute value of the FORM tag shown in FIG. 13B is transmitted to the image forming apparatus 10.

画像形成装置10では、このメッセージに対応した上述のS識別子を引数としてSET処理制御部353が起動され、処理関数群356内の対応する関数及びDBMS36を介してデータベース41内のアドレス帳データが更新又は削除される。   In the image forming apparatus 10, the SET processing control unit 353 is activated with the above S identifier corresponding to this message as an argument, and the address book data in the database 41 is updated via the corresponding function in the processing function group 356 and the DBMS 36. Or deleted.

また、ユーザが、追加しようとする宛先を図9(C)の宛先ボックスに記入し、「追加」ラジオボタンを選択して実行ボタンを押下すると、前記と同様に、この宛先と、追加を示すデータと、図13(B)に示すFORMタグの属性値とを含むリクエストメッセージが画像形成装置10へ送信され、SET処理制御部353、処理関数群356及びDBMS36を介しデータベース41内のアドレス帳データに、この宛先が追加される。   Also, when the user enters the destination to be added in the destination box of FIG. 9C, selects the “Add” radio button and presses the execution button, this destination and addition are indicated as described above. A request message including the data and the attribute value of the FORM tag shown in FIG. 13B is transmitted to the image forming apparatus 10, and the address book data in the database 41 is set via the SET processing control unit 353, the processing function group 356, and the DBMS 36. This destination is added.

設定値変更の他の例として、図9(B)に示す画面でFAX送信設定値ボタンを押下すると、そのリクエストメッセージに対応して、図10に示すような画面を表示するためのリスポンスメッセージが画像形成装置10からWebクライアントマシーン20へ送信される。この画面には、FAX受信までのコール回数選択ドロップダウンリスト、送信完了/失敗通知手段選択ドロップダウンリスト及びその宛先並びにアドレス帳選択ドロップダウンリストが表示されている。通知手段選択ドロップダウンリストには「e−mail」、「携帯電話」、「無し」の項目がある。   As another example of setting value change, when the FAX transmission setting value button is pressed on the screen shown in FIG. 9B, a response message for displaying the screen shown in FIG. 10 is displayed in response to the request message. The image is transmitted from the image forming apparatus 10 to the Web client machine 20. This screen displays a call count selection drop-down list until FAX reception, a transmission completion / failure notification means selection drop-down list, a destination thereof, and an address book selection drop-down list. The notification means selection drop-down list includes items “e-mail”, “mobile phone”, and “none”.

ここで、図2のデータベース41には、クライアントのIDと通知手段ごとの宛先アドレスとが登録されており、図10で宛先が「登録先」となっている場合には、この登録された宛先が用いられる。図10で選択されたアドレス帳は、図9(B)及び(C)で用いられる。   Here, in the database 41 of FIG. 2, the client ID and the destination address for each notification means are registered, and when the destination is “registered destination” in FIG. Is used. The address book selected in FIG. 10 is used in FIGS. 9B and 9C.

設定値変更の種類には、マイ設定と共通設定とがある。マイ設定はクライアント毎の設定であり、共通設定は各クライアントに共通の設定である。   Types of setting value change include my setting and common setting. My settings are settings for each client, and common settings are settings common to each client.

マイ設定は、共通設定の一部または全部を、共通設定を変更せずにクッキーによりユーザ毎に設定値を書き換えるものである。このクッキーの値は、処理関数群356内の設定値取得関数で用いられる。すなわち、この関数は、該当するものがクッキーにあればその値を取得し、無ければDBMS36を介しデータベース41内の該当する設定値(共通設定値)を取得する。   My setting is for rewriting a setting value for each user by a cookie without changing the common setting for a part or all of the common setting. The value of this cookie is used in a setting value acquisition function in the processing function group 356. That is, this function obtains the corresponding setting value (common setting value) in the database 41 via the DBMS 36 if there is a corresponding one in the cookie.

共通設定は、データベース41に格納された設定であり、クッキーにより書き換えられない項目の設定値として用いられる。すなわち、処理関数群356内の設定値取得関数は、マイ設定でクッキーにより個別に変更されない項目については、データベース41内の共通設定値を取得する。   The common setting is a setting stored in the database 41, and is used as a setting value of an item that cannot be rewritten by a cookie. That is, the setting value acquisition function in the processing function group 356 acquires the common setting value in the database 41 for items that are not individually changed by the cookie in My Settings.

図10に示す「共通」は、マイ設定において共通設定の値が用いられ(クッキーを使用しない)又は共通設定において変更しないことを示している。共通設定値の変更は、管理者権限でログインしている場合のみ許可される。管理者権限でログインしているか否かは、後述の認証クッキーで判定される。   “Common” shown in FIG. 10 indicates that the value of the common setting is used in My Settings (cookie is not used) or is not changed in the common settings. Changing common setting values is allowed only when logged in with administrator privileges. Whether or not the user is logged in with administrator authority is determined by an authentication cookie described later.

なお、管理者権限でログインしている場合、処理関数群356内の設定値取得関数はデータベース41内の共通設定値を取得する。   When logged in with administrator authority, the setting value acquisition function in the processing function group 356 acquires the common setting value in the database 41.

「変更」ボタンを押下すると、図10に示す情報を含むリクエストメッセージが画像形成装置10へ送信され、図2のSET処理制御部353及びこれに関係した部分で、図8に示すような処理が行われる。   When the “change” button is pressed, a request message including the information shown in FIG. 10 is transmitted to the image forming apparatus 10, and the processing shown in FIG. 8 is performed in the SET processing control unit 353 in FIG. Done.

(S50)SET処理制御部353は、S変数に基づいて例えば、IN[0]="my"(「マイ設定」),IN[1]="common"(FAX受信までのコール回数が「共通」),IN[2]="e-mail"(通知手段が「e-mail」),IN[3]="same"(宛先が「登録先」),IN[4]="DesignDepartment"(アドレス帳が「DesignDepartment」) とし、FAX送信設定値変更関数を呼び出す。   (S50) Based on the S variable, the SET processing control unit 353, for example, IN [0] = "my" ("My setting"), IN [1] = "common" (the number of calls until FAX reception is "common" )), IN [2] = "e-mail" (notification means is "e-mail"), IN [3] = "same" (address is "registration destination"), IN [4] = "DesignDepartment" ( The address book is “DesignDepartment”) and the FAX transmission setting value change function is called.

(S51)FAX送信設定値変更関数は、IN[0]に基づいて、共通設定とマイ設定のどちらが選択されたかを判定し、前者と判定した場合にはステップS52へ進み、後者と判定した場合にはステップS57へ進む。   (S51) The FAX transmission setting value change function determines whether common setting or my setting is selected based on IN [0]. If it is determined to be the former, the process proceeds to step S52, and if it is determined to be the latter Then, the process proceeds to step S57.

(S52)FAX送信設定値変更関数は、認証クッキーに基づいて、管理者権限でログインしているか否かを判定し、肯定判定した場合にはステップS53へ進み、そうでなければステップS56へ進む。   (S52) Based on the authentication cookie, the FAX transmission setting value change function determines whether or not the user is logged in with administrator authority. If the determination is affirmative, the process proceeds to step S53. Otherwise, the process proceeds to step S56. .

(S53)FAX送信設定値変更関数は、IN[1]〜IN[4]の値で、DBMS36を介しデータベース41に格納されている対応する設定値を更新する。但し、IN[1]="common"であれば、FAX受信までのコール回数を更新しない。また、IN[3]="same"であれば、通知先を更新しない。   (S53) The FAX transmission setting value change function updates the corresponding setting value stored in the database 41 via the DBMS 36 with the values of IN [1] to IN [4]. However, if IN [1] = "common", the number of calls until FAX reception is not updated. If IN [3] = "same", the notification destination is not updated.

(S54)FAX送信設定値変更関数は、IN[3]についてDBMS36が設定値変更を許可した場合には*OUT[0]に"OK"を代入し、禁止した場合には*OUT[0]に"NG"を代入するとともにその原因を示す文字列をDBMS36から取得して*OUT[1]に代入する。設定値変更関数からSET処理制御部353にリターンする。   (S54) The FAX transmission set value change function assigns “OK” to * OUT [0] when the DBMS 36 permits change of the set value for IN [3], and * OUT [0] when it is prohibited. "NG" is assigned to, and a character string indicating the cause is obtained from the DBMS 36 and assigned to * OUT [1]. From the set value change function, the process returns to the SET process control unit 353.

(S55)SET処理制御部353は、*OUT[0]が"OK"、"NG"又は"NotAuth"であればそれぞれ、テンプレートファイルOK.html、NG.html又はNotAuth.htmlのパスを引数としてGET処理制御部352を呼び出す。   (S55) If * OUT [0] is “OK”, “NG”, or “NotAuth”, the SET processing control unit 353 takes the path of the template file OK.html, NG.html, or NotAuth.html as an argument, respectively. Call the GET processing control unit 352.

GET処理制御部352はこれに応答して、HTMLトランスレータ355を介しテンプレートファイルに基づいてHTMLファイルを作成させ、このファイルにリスポンスヘッダの一部を付加する。作成されたNotAuth.htmには、そのフォームにユーザのID及びパスワードの入力ボックスが記述されている。GET処理制御部352は、HTTP処理スレッド341を介して残りのリスポンスヘッダを付加させ、リスポンスメッセージとしてWebクライアントマシーン20へ送信させ、図8の処理を終了する。   In response to this, the GET processing control unit 352 creates an HTML file based on the template file via the HTML translator 355, and adds a part of the response header to this file. In the created NotAuth.htm, an input box for the user ID and password is described in the form. The GET processing control unit 352 adds the remaining response header via the HTTP processing thread 341, transmits it to the Web client machine 20 as a response message, and ends the processing of FIG.

なお、ユーザのID及びパスワードは、画像形成装置10のサイトのトップ頁でも入力させるようにしてもよい。   The user ID and password may be entered on the top page of the image forming apparatus 10 site.

(S56)*OUT[0]に"NotAuth"を代入し、ステップS55へ進む。   (S56) “NotAuth” is substituted into * OUT [0], and the process proceeds to step S55.

(S57)上記R識別子で識別される構造体変数の対応する要素の値、すなわち図10の設定値の名前とその値の組をそれぞれ、値が「共通」又は「登録先」であるものを除き、クッキーにセットする。このクッキーは、ステップS55において、ヘッダフィールドとされる。   (S57) The value of the corresponding element of the structure variable identified by the R identifier, that is, the name of the setting value in FIG. Except for cookies. This cookie is used as a header field in step S55.

(S58)IN[1]が"common"でない場合、文字数等が条件を満たしているか否かを判定し、肯定判定した場合には*OUT[0]に"OK"を代入し、否定判定した場合には*OUT[0]に"NG"を代入するとともにその原因を示す文字列を*OUT[1]に代入する。次にステップS55へ進む。   (S58) If IN [1] is not “common”, it is determined whether the number of characters satisfies the condition. If an affirmative determination is made, “OK” is assigned to * OUT [0] and a negative determination is made. In this case, "NG" is assigned to * OUT [0] and a character string indicating the cause is assigned to * OUT [1]. Next, the process proceeds to step S55.

このような処理により、マイ設定と共通設定とを簡単かつ容易に行うことができるとともに、ユーザに応じたサービスを提供することができるという効果を奏する。   By such processing, it is possible to easily and easily perform the my setting and the common setting, and it is possible to provide a service according to the user.

また、SET処理制御部353での処理が成功したか否かに応じて、GET処理制御部352を介しリスポンスボディを生成させるので、SET処理でGET処理を有効利用してソフトウエア構成を簡単化することができるという効果を奏する。   In addition, since the response body is generated via the GET processing control unit 352 depending on whether the processing in the SET processing control unit 353 is successful, the software configuration is simplified by effectively using the GET processing in the SET processing. There is an effect that can be done.

なお、共通設定は、管理者権限で操作パネル15を操作して直接変更することもできる。   The common settings can also be changed directly by operating the operation panel 15 with administrator authority.

また、ステップS52で正当な権限がないと判定され、ブラウザ上のNotAuth.htm表示画面でユーザのID及びパスワードが入力されて、これに対応したデータがリクエストメッセージとして画像形成装置10へ送信される。このメッセージのリクエスト行は例えば、POST /cgi-bin/login.cgi HTTP/1.1であり、上述のS識別子を引数として、図2において認証制御部351が起動される。   In step S52, it is determined that the user does not have a valid authority, and the user ID and password are input on the NotAuth.htm display screen on the browser, and data corresponding to this is transmitted to the image forming apparatus 10 as a request message. . The request line of this message is, for example, POST / cgi-bin / login.cgi HTTP / 1.1, and the authentication control unit 351 is activated in FIG. 2 with the above S identifier as an argument.

認証制御部351は、S変数の要素に格納されているユーザの前記データを引数として、処理関数群356内の関数Authを呼び出す。この関数は、DBMS36を介し、このデータに対応したデータがデータベース41内に登録されているか否かを判定し、肯定判定した場合には*OUT[0]に"OK"を代入し、否定判定した場合には*OUT[0]に"NotAuth"を代入する。認証制御部351は、*OUT[0]の内容に応じて、SET処理の場合と同様の処理を行う。ただし、認証制御部351は、*OUT[0]="OK"の場合、認証されたこと及び管理者権限が有るか否かを示す認証クッキー、例えば、Set-Cookie: login=admin_1068625073を、リスポンスヘッダフィールドとして、リスポンスボディに付加する。Webクライアントマシーン20がこのクッキーを受け取った後は、Webクライアントマシーン20から画像形成装置10へリクエストメッセージが送信される毎に、これに該クッキーが含まれる。   The authentication control unit 351 calls the function Auth in the processing function group 356 with the user's data stored in the element of the S variable as an argument. This function determines whether or not the data corresponding to this data is registered in the database 41 via the DBMS 36. If an affirmative determination is made, “OK” is assigned to * OUT [0], and a negative determination is made. If this happens, substitute "NotAuth" for * OUT [0]. The authentication control unit 351 performs the same process as in the SET process according to the contents of * OUT [0]. However, when * OUT [0] = “OK”, the authentication control unit 351 responds with an authentication cookie indicating authentication and whether or not the administrator has authority, for example, Set-Cookie: login = admin_1068625073. It is added to the response body as a header field. After the Web client machine 20 receives this cookie, the cookie is included in the request message transmitted from the Web client machine 20 to the image forming apparatus 10.

本実施例1によれば、Webアプリケーション35において、処理細振分部350により、クライアントからのリクエストURIに含まれるパスのファイル名に基づいて複数の処理制御部351〜354のいずれかに制御を移させ、複数の処理制御部351〜354のそれぞれが直接又は間接的に処理関数群356の中の少なくとも1つを介して処理を行わせるので、処理関数群356に新たな関数を追加したり、処理関数群356の中の1つ以上の関数を変更したり、複数の処理制御部351〜354に新たな処理制御部を追加することにより、容易に機能を拡張又は変更することができるという効果を奏し、新製品の開発期間短縮に寄与するところが大きい。   According to the first embodiment, in the Web application 35, the processing sub-distribution unit 350 controls any one of the plurality of processing control units 351 to 354 based on the file name of the path included in the request URI from the client. Since each of the plurality of processing control units 351 to 354 directly or indirectly performs processing via at least one of the processing function group 356, a new function can be added to the processing function group 356. The function can be easily expanded or changed by changing one or more functions in the processing function group 356 or adding a new processing control unit to the plurality of processing control units 351 to 354. It has a significant effect and contributes to shortening the development period of new products.

なお、本発明には外にも種々の変形例が含まれる。   The present invention includes various modifications in addition to the above.

例えば、上記実施例ではCGIを用いた場合を説明したが、本発明はCGIに限定されない処理の手法に特徴があるので、CGIの替わりにASPやJSPなどを用いた構成であってもよい。   For example, although the case where CGI is used has been described in the above embodiment, since the present invention is characterized by a processing method that is not limited to CGI, a configuration using ASP, JSP, or the like may be used instead of CGI.

また、関数の返り値は、関数の値であってもよい。関数は、関数とサブルーチンを区別するプログラム言語におけるサブルーチン、又はクラスのメンバ関数などであってもよい。引数は、メンバ変数を介して関数へ引き渡す構成であってもよい。   The return value of the function may be a function value. The function may be a subroutine in a programming language that distinguishes a function from a subroutine, or a member function of a class. The argument may be passed to the function via a member variable.

さらに、テンプレートファイルはHTMLファイルを作成するためのものに限定されず、XMLファイルなどの他のファイルを作成するためのものであってもよい。   Furthermore, the template file is not limited to the one for creating an HTML file, and may be for creating another file such as an XML file.

また、メッセージ・トークンは、メッセージ以外にも利用可能である。   Further, the message token can be used other than the message.

また、図3のステップS3において、パスに含まれるファイル名の拡張子がテンプレートファイルであることを示している場合に、ステップS2へ進む構成であってもよい。図4において、ファイル名拡張子が"cgi"でなければステップS13へ進むようにしてもよい。フォースファイル項目のパス及びこれと比較されるパスは、実パスであってもよい。   Further, in step S3 in FIG. 3, when the extension of the file name included in the path indicates a template file, the configuration may proceed to step S2. In FIG. 4, if the file name extension is not “cgi”, the process may proceed to step S13. The path of the force file item and the path compared thereto may be real paths.

さらに、図3と図4の処理を1つにまとめた構成や、DBMS36を用いない構成であってもよい。メインWebサーバ34、Webアプリケーション35及びDBMS36はそれぞれプロセスとして動作する構成であってもよい。   Furthermore, a configuration in which the processes of FIGS. 3 and 4 are combined into one, or a configuration in which the DBMS 36 is not used may be used. The main Web server 34, the Web application 35, and the DBMS 36 may be configured to operate as processes.

また、汎用のinetd31及びhttpd32を用いずに、これらの機能をHTTP処理スレッド生成部340に含めた構成であってもよい。   Alternatively, the HTTP processing thread generation unit 340 may include these functions without using the general-purpose inetd 31 and httpd 32.

また、上記実施例では情報処理装置が画像形成装置である場合を説明したが、本発明はこれに限定されず、本発明は特許請求の範囲に記載された構成を含むものであればよい。   Moreover, although the case where the information processing apparatus is an image forming apparatus has been described in the above embodiment, the present invention is not limited to this, and the present invention only needs to include the configuration described in the claims.

主に画像形成装置のソフトウエア構成を示す機能ブロック図である。2 is a functional block diagram mainly showing a software configuration of an image forming apparatus. FIG. 主に図1中のWebアプリケーションの構成を示す機能ブロック図である。It is a functional block diagram which mainly shows the structure of the web application in FIG. 図1中の処理粗振分部による処理を示すフローチャートである。It is a flowchart which shows the process by the process rough distribution part in FIG. 図2中の処理細振分部による処理を示すフローチャートである。It is a flowchart which shows the process by the process fine distribution part in FIG. (A)は図2中のHTMLトランスレータによる処理を示すフローチャートであり、(B)はHTMLテンプレートファイルの各々についてそのパスとファイルサイズに対応したバイト数とを対応させたバッファサイズテーブルの説明図である。(A) is a flowchart showing processing by the HTML translator in FIG. 2, and (B) is an explanatory diagram of a buffer size table in which the path and the number of bytes corresponding to the file size are associated with each HTML template file. is there. 図5(A)中のステップS27の詳細を示すフローチャートである。It is a flowchart which shows the detail of step S27 in FIG. 5 (A). 図5(A)中のステップS25での、主にforディレクティブに対する処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the process with respect to a for directive mainly in step S25 in FIG. 5 (A). 図10に示すブラウザ上の「変更」ボタン押下に応答した、画像形成装置のSET処理制御部及びこれに関係した部分での処理を示すフローチャートである。FIG. 11 is a flowchart showing processing in a SET processing control unit of the image forming apparatus and a part related thereto in response to pressing of a “change” button on the browser shown in FIG. (A)〜(C)はそれぞれ、クライアントのブラウザ上に表示されるトップ頁画面、FAX送信画面及びアドレス帳編集画面を示す図である。(A)-(C) is a figure which respectively shows the top page screen, FAX transmission screen, and address book edit screen which are displayed on the browser of a client. クライアントのブラウザ上に表示されるFAX送信設定値変更画面を示す図である。It is a figure which shows the FAX transmission setting value change screen displayed on the browser of a client. (A)は処理成功の場合に汎用される、メッセージ・トークンを含んだHTMLテンプレートファイルの説明図、(B)はこのHTMLテンプレートファイルに基づいてHTMLトランスレータにより生成されたHTMLファイルの説明図、(C)は処理失敗の場合に汎用される、メッセージ・トークンを含んだHTMLテンプレートファイルの説明図、(D)はこのHTMLテンプレートファイルに基づいてHTMLトランスレータにより生成されたHTMLファイルの説明図、(E)はFAX送信処理成功の場合に用いられる、メッセージ・トークンを含んだHTMLテンプレートファイルの説明図、(F)はこのHTMLテンプレートファイルに基づいてHTMLトランスレータにより生成されたHTMLファイルの説明図である。(A) is an explanatory diagram of an HTML template file including a message token, which is generally used when processing is successful, and (B) is an explanatory diagram of an HTML file generated by an HTML translator based on the HTML template file. (C) is an explanatory diagram of an HTML template file including a message token, which is generally used in the case of processing failure, (D) is an explanatory diagram of an HTML file generated by an HTML translator based on this HTML template file, (E () Is an explanatory diagram of an HTML template file including a message token used when the FAX transmission processing is successful, and (F) is an explanatory diagram of an HTML file generated by an HTML translator based on the HTML template file. (A)は図9(B)に示す画面に対応したHTMLファイルを作成するための、多価関数トークンを含むHTMLテンプレートファイルの説明図、(B)はこのHTMLテンプレートファイルに基づいてHTMLトランスレータにより生成されたHTMLファイルの説明図である。(A) is an explanatory diagram of an HTML template file including a multivalent function token for creating an HTML file corresponding to the screen shown in FIG. 9 (B), and (B) is an HTML translator based on the HTML template file. It is explanatory drawing of the produced | generated HTML file. (A)は図9(C)に示す画面に対応したHTMLファイルを作成するための、多価関数トークンを含むHTMLテンプレートファイルの説明図、(B)はこのHTMLテンプレートファイルに基づいてHTMLトランスレータにより生成されたHTMLファイルの説明図である。(A) is an explanatory diagram of an HTML template file including a multivalent function token for creating an HTML file corresponding to the screen shown in FIG. 9 (C), and (B) is an HTML translator based on the HTML template file. It is explanatory drawing of the produced | generated HTML file. (A)は図9(A)及び(B)に関係した、Webクライアントマシーンと画像形成装置との間のメッセージ送受概略を示すシーケンス図、(B)は図9(A)〜(C)に関係した、Webクライアントマシーンと画像形成装置との間のメッセージ送受概略を示すシーケンス図である。9A is a sequence diagram showing an outline of message transmission / reception between the Web client machine and the image forming apparatus related to FIGS. 9A and 9B, and FIG. 9B is a sequence diagram of FIGS. FIG. 5 is a sequence diagram showing an outline of related message transmission / reception between a Web client machine and an image forming apparatus. 本発明の実施例1に係る画像形成システムのハードウエア概略ブロック図である。1 is a schematic hardware block diagram of an image forming system according to Embodiment 1 of the present invention.

符号の説明Explanation of symbols

10 画像形成装置
11 MPU
12 インターフェイス
13 PROM
14 DRAM
15 操作パネル
16 プリンタ
17 スキャナ
18 NIC
19 FAXモデム
20、21 Webクライアントマシーン
28 公衆回線網
29 FAX装置
30 OS
300 NICドライバ
301 メモリマネージャ
31 inetd
32 httpd
33 メール送信サーバ
34 Webサーバ
340 HTTP処理スレッド生成部
341 HTTP処理スレッド
342 処理粗振分部
343 静的リソース処理部
35 Webアプリケーション
350 処理細振分部
351 認証制御部
352 GET処理制御部
353 SET処理制御部
354 イメージ処理制御部
355 HTMLトランスレータ
356 処理関数群
357 イメージ処理部
36 DBMS
37 静的リソース
38 HTMLテンプレートファイル
39 バッファサイズテーブル
40 言語テンプレートファイル
41 データベース
42 コンフィグレーションファイル
10 Image forming apparatus 11 MPU
12 Interface 13 PROM
14 DRAM
15 Operation panel 16 Printer 17 Scanner 18 NIC
19 FAX modem 20, 21 Web client machine 28 Public line network 29 FAX device 30 OS
300 NIC driver 301 Memory manager 31 inetd
32 httpd
33 Mail Transmission Server 34 Web Server 340 HTTP Processing Thread Generation Unit 341 HTTP Processing Thread 342 Processing Coarse Distribution Unit 343 Static Resource Processing Unit 35 Web Application 350 Processing Fine Distribution Unit 351 Authentication Control Unit 352 GET Processing Control Unit 353 SET Processing Control unit 354 Image processing control unit 355 HTML translator 356 Processing function group 357 Image processing unit 36 DBMS
37 Static resources 38 HTML template file 39 Buffer size table 40 Language template file 41 Database 42 Configuration file

Claims (6)

プロセッサと、
Webアプリケーションと、テンプレートファイルとが格納され、該プロセッサに結合された記憶手段と、
を備えた情報処理装置において、該Webアプリケーションは、
関数と、
該プロセッサに対し、リスポンスボディを作成させるために、指定されたテンプレートファイルに含まれるコンテキスト・トークンを、該関数の返り値で置換させるトランスレータと、
を有し、該コンテキスト・トークンは識別子を含み、該関数は該識別子に応じた複数の返り値を有することを特徴とする情報処理装置。
A processor;
Storage means for storing a web application and a template file and coupled to the processor;
In the information processing apparatus including the Web application,
Functions and
A translator that replaces the context token contained in the specified template file with the return value of the function to cause the processor to create a response body;
And the context token includes an identifier, and the function has a plurality of return values corresponding to the identifier.
該返り値は配列要素の内容であり、該識別子は該配列要素を識別するインデックスであることを特徴とする請求項1に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the return value is a content of an array element, and the identifier is an index for identifying the array element. 該Webアプリケーションは、返り値の形式が統一された関数を複数有し、
該置換は該複数の関数のどれであるかとは無関係に行われることを特徴とする請求項1又は2に記載の情報処理装置。
The Web application has a plurality of functions whose return value formats are unified,
The information processing apparatus according to claim 1, wherein the replacement is performed regardless of which of the plurality of functions is performed.
該記憶手段にはさらに、データベースが格納され、該テンプレートファイルを複数有し、
該Webアプリケーションはさらに、
該プロセッサに対し、該トランスレータを介し、指定されたテンプレートファイルに基づいてリスポンスメッセージボディを作成させるGET処理制御部と、
該プロセッサに対し、クライアントからのクエリ文字列に基づいて該複数の関数のうち対応するものを介し該データベースに含まれる設定データを変更させ、該クエリ文字列で指定されこの変更の成否に応じて定まるテンプレートファイルを指定して該GET処理制御部に制御を移させるSET処理制御部と、
を有し、該変更の成否に応じて定まるテンプレートファイルにコンテキスト・トークンが含まれていることを特徴とする請求項3に記載の情報処理装置。
The storage means further stores a database and has a plurality of the template files,
The web application further includes
A GET processing control unit that causes the processor to create a response message body based on a specified template file via the translator;
Based on the query character string from the client, the processor changes the setting data included in the database via the corresponding one of the plurality of functions, and is designated by the query character string, depending on the success or failure of the change A SET processing control unit that designates a fixed template file and transfers control to the GET processing control unit;
The information processing apparatus according to claim 3, wherein a context token is included in a template file that is determined according to success or failure of the change.
該Webアプリケーションはさらに、
該プロセッサに対し、クライアントからのリクエストメッセージに含まれるファイルの内容を処理させ、クライアントからのクエリ文字列で指定されこの内容処理の成否に応じて定まるテンプレートファイルを指定して該GET処理制御部に制御を移させるイメージ処理制御部を有し、
該内容処理の成否に応じて定まるテンプレートファイルにコンテキスト・トークンが含まれていることを特徴とする請求項4に記載の情報処理装置。
The web application further includes
The processor processes the contents of the file included in the request message from the client, specifies the template file specified by the query character string from the client and determined according to the success / failure of the contents processing, and sends it to the GET processing control unit. An image processing control unit for transferring control;
The information processing apparatus according to claim 4, wherein a context token is included in a template file determined according to success or failure of the content processing.
該複数の返り値は、該成否を示す値を含み、該成否が失敗を示している場合にはさらにその原因を示す値を含むことを特徴とする請求項4又は5に記載の情報処理装置。   6. The information processing apparatus according to claim 4, wherein the plurality of return values include a value indicating the success or failure, and further include a value indicating the cause when the success or failure indicates failure. .
JP2007228768A 2007-09-04 2007-09-04 Information processing device Active JP5140351B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2007228768A JP5140351B2 (en) 2007-09-04 2007-09-04 Information processing device
US12/203,662 US8073872B2 (en) 2007-09-04 2008-09-03 Information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007228768A JP5140351B2 (en) 2007-09-04 2007-09-04 Information processing device

Publications (2)

Publication Number Publication Date
JP2009065238A true JP2009065238A (en) 2009-03-26
JP5140351B2 JP5140351B2 (en) 2013-02-06

Family

ID=40559460

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007228768A Active JP5140351B2 (en) 2007-09-04 2007-09-04 Information processing device

Country Status (1)

Country Link
JP (1) JP5140351B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011206962A (en) * 2010-03-29 2011-10-20 Sharp Corp Composite machine, composite machine control system, program and recording medium
JPWO2013069163A1 (en) * 2011-11-11 2015-04-02 株式会社三菱東京Ufj銀行 Web server and web page display method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004086354A (en) * 2002-08-23 2004-03-18 Ricoh Co Ltd Image processor

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004086354A (en) * 2002-08-23 2004-03-18 Ricoh Co Ltd Image processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011206962A (en) * 2010-03-29 2011-10-20 Sharp Corp Composite machine, composite machine control system, program and recording medium
JPWO2013069163A1 (en) * 2011-11-11 2015-04-02 株式会社三菱東京Ufj銀行 Web server and web page display method

Also Published As

Publication number Publication date
JP5140351B2 (en) 2013-02-06

Similar Documents

Publication Publication Date Title
US8958095B2 (en) Relay server, relay server control method, and storage medium
JP4240690B2 (en) Information processing apparatus, information processing method, information processing system, and recording medium
US8073872B2 (en) Information processing apparatus
JP5170141B2 (en) Printer and terminal device
JP5397419B2 (en) Terminal device, web page display method, and computer program
JP5140351B2 (en) Information processing device
JP4986234B2 (en) Information processing device
JP2010109650A (en) Information processor and image-forming system including the same
JP5140350B2 (en) Information processing device
JP5140349B2 (en) Information processing device
JP5090828B2 (en) Information processing device
JP5040026B2 (en) Information processing device
JP5450678B2 (en) Network event notification system
JP5059523B2 (en) Information processing device
US8368906B2 (en) Performing a virtual job using a plurality of mixed image processing apparatuses that can communicate each other
JP4945728B2 (en) Image forming apparatus, UI client for unifying UI screen thereof, image forming apparatus with extended console, and setting value selection coping method
JP5389343B2 (en) Information processing device
JP5084404B2 (en) Information processing device
JP5194271B2 (en) Information processing device
JP5238203B2 (en) Information processing device
JP2012243286A (en) Information processing device, document data update method and computer program
JP2007081771A (en) Job processor and job requesting device
JP2009187161A (en) Image forming apparatus, its ui client for unifying ui screen, image forming apparatus with extended console, and setup value selection coping method
JP2004274736A (en) Service information providing apparatus, user terminal, service information providing method, service utilizing method, service information providing program, service utilizing program, and recording medium
JP4141210B2 (en) Image forming apparatus having Web service function

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120717

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120914

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121023

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121119

R150 Certificate of patent or registration of utility model

Ref document number: 5140351

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151122

Year of fee payment: 3