دانلود ترجمه Java CGI How To جاوا سی جی آی

Word 218 KB 17147 54
مشخص نشده مشخص نشده کامپیوتر - IT
قیمت قدیم:۲۴,۰۰۰ تومان
قیمت: ۱۹,۸۰۰ تومان
دانلود فایل
  • بخشی از محتوا
  • وضعیت فهرست و منابع
  • This HOWTO document explains how to set up your server to allow CGI programs written in Java and how to use Java to write CGI programs.

    Although HOWTO documents are targetted towards use with the Linux operating system, this particular one is not dependant on the particular version of unix uses.

    این مدارک How To چگونگی تنظیم سرور برای میسر ساختن برنامه های CGI نوشته شده به زبان جاوا و چگونگی استفاده ازJava در نوشتن برنامه هایJava را شرح می‌دهد.

    اگرچه هدف مستندات How To، اسفاده آن با سیستم عملLinux است، این مورد خاص به نسخه خاصی از unix مورد استفاده وابستگی ندارد.

    1.

    Introduction 1- مقدمه
    1.1.

    Prior Knowledge • 1-1- دانش قبلی

    1.2.

    This Document • 2-1- این مدارک
    1.3.

    The Package • 3-1- بسته بندی
    1.4.

    The Mailing List • 4-1- لیست میل
    2.

    Setting Up Your Server to Run Java CGI Programs (With Explanations) 2- تنظیم سرور برای اجرای برنامه های Java CGI (با توضیح)

    2.1.

    System Requirements • 1-2- ملزومات سیستم
    2.2.

    Java CGI Add-On software • 2-2- نرم افزار افزایشی Java CGI

    2.3.

    Unpacking the Source • 3-2- غیر بسته بندی منبع
    2.4.

    Decide On Your Local Path Policies • 4-2- تصمیم گیری در مورد سیاست های مسیر محلی

    2.5.

    Testing your installation • 5-2- تست نصب
    3.

    Setting Up Your Server to Run Java CGI Programs (the short form) 3- تنظیم سرور برای اجرای برنامه های Java CGI (خلاصه)

    4.

    Executing a Java CGI Program 4- اجرای یک برنامه Java CGI

    4.1.

    Obstacles to Running Java – Programs Under the CGI Model • 1-4- موانعی در اجرای برنامه های Java تحت مدلCGI

    4.2.

    Overcoming Problesm in Running Java CGI Programs • 2-4- حل مشکلات در اجرای برنامه های Java CGI

    5.

    Using the Java CGI Classes 5- استفاده از کلاس های Java CGI

    5.1 CGI • 1-5- CGI
    5.2.

    CGI _ Test • 2-5- تست CHI
    5.3.

    Email • 3-5- ایمیل
    5.4.

    Emal_ Test • 4-5- تست- ایمیل
    5.5.

    HTML
    • 5-5- HTML
    5.6.

    HTML _ Test • 6-5- HTML- Test
    5.7.

    Text • 7-5- متن
    6.

    Future Plans
    6- طرح های بعدی

    7.

    Changes 7- تغییرات

    7.1.

    Changes from 0.4 to 0.5 • 1-7- تغییرات 4/0 تا 5/0
    7.2 Changes from 0.3.

    to 04 • 2-7- تغییرات 3/0 تا 4/0
    7.3 Changes from 0.2.

    to 03
    • 3-7- تغییرات 2/0 تا 3/0
    7.4 Changes from 0.1.

    to 02 • 4-7- تغییرات 1/0 تا 2/0
    1.

    Introcuction 1- مقدمه

    Because of the way that Java is designed the programmer does not have easy access to the system’s environment variables.

    Because of the way that the Java Development Kit (JDK) is set up, it is necessary to use multiple tokens to invoke a program, which does not mesh very well with the standard HTML forms/CGI manner of operations.

    There are ways around these limitations, and I have implemented one of them.

    Read further for details.

    به دلیل روشنی کهJava طراحی می شود، برنامه نویس دسترسی آسان به متغیرهای محیط سیستم ندارد.

    به دلیل روشی که جعبه توسعه (JDK) تنظیم می شود، استفاده از نشانه های چندگانه در استنتاج یک برنامه جدید ضروری است که به خوبی با قالب های استاندارد HTML روش CGI عملیات ها مطابقت ندارد.

    راه هایی در این محدودیت ها وجود دارد، یکی از آنها را پیاده سازی کردم.

    بعداً جزئیات را مطالعه کنید.

    Since I wrote the previous paragraph in 1996 , there have been many changes in the Java technology.

    It is likely that a better solution to running server – side Java programs is now available – perhaps your should take a look at servlets.

    از آنجا که پاراگراف قبلی را در 1996 نوشتم، تکنولوژیJava تغییرات زیادی یافته است.

    احتمالاً روش بهتری برای اجرای سرور وجود دارد، اکنون برنامه های جانبی جاوا در دسترس می باشد، شاید به سروست ها نظری اندازید.

    1.1.

    Prior Knowledge 1-1- آگاهی قبلی
    I am assuming that you have a general knowledge of HTML and CGI concepts and at least a minimal knowledge of your HTTP server.

    You should also know how to program in Java, or a lot of this will not make sense.

    فرض می کنیم که آگاهی عمومی و کلی از مفاهیم HTML, CGI و حداقل، معلومات اندکی از سرورHTTP خود دارید.

    همچنین باید چگونگی برنامه نویسی به زبانJava را بدانید با مقدار زیادی از اینها معقولانه به نظر نمی رسد.



    1.2 This Document 2-1- این مدرک

    The latest version of this document can be read at http://www.orbits.com/software/Java_CGI.html.
    آخرین نسخه این مدرک را می توان در سایت http://www.orbits.com/software/ Java-CGI.html خواند.

    1.3 The Package 3-1- بسته بندی

    The latest version of the package described here can be accessed via anonymous FTP at ftp://ftp.orbits.com/pub/software/java_cgi-0.5.tgz.

    The package distribution includes SGML source for this document.

    می توان با FTP بی نام در سایت ftp://ftp.orbits.com/pub/soft ware/Java- Cgi-0.5.tgz به آخرین نسخه بسته شرح داده شده در اینجا دسترسی یافت.

    توزیع بسته بندی شامل منبع SGML این مدرک می شود.

    The package is distributed under the terms of the GNU Library General Public License.

    This document can be distributed under the terms of the Linux HOWTO copyright notice.

    بسته تحت شرایط گواهینامه عمومی کلی کتابخانه GNU توزیع می شود.

    این مدرک را می توان تحت شرایط نکته کپی رایت Linux HowTo منتشر کرد.
    Java CGI HOWTOJava CGI HowBy David H.

    Silber javacgi-document@orbits.comنوشته: دیوید اچ.

    سیلبر javacgi-document@orbits.comV0.5,1 December 19985/0، اول دسامبر 1998This HOWTO document explains how to set up your server to allow CGI programs written in Java and how to use Java to write CGI programs.

    Although HOWTO documents are targetted towards use with the Linux operating system, this particular one is not dependant on the particular version of unix uses.این مدارک How To چگونگی تنظیم سرور برای میسر ساختن برنامه های CGI نوشته شده به زبان جاوا و چگونگی استفاده ازJava در نوشتن برنامه هایJava را شرح می‌دهد.

    اگرچه هدف مستندات How To، اسفاده آن با سیستم عملLinux است، این مورد خاص به نسخه خاصی از unix مورد استفاده وابستگی ندارد.1.

    Introduction1- مقدمه1.1.

    Prior Knowledge1-1- دانش قبلی1.2.

    This Document2-1- این مدارک1.3.

    The Package3-1- بسته بندی1.4.

    The Mailing List4-1- لیست میل2.

    Setting Up Your Server to Run Java CGI Programs (With Explanations)2- تنظیم سرور برای اجرای برنامه های Java CGI (با توضیح)2.1.

    System Requirements1-2- ملزومات سیستم2.2.

    Java CGI Add-On software2-2- نرم افزار افزایشی Java CGI2.3.

    Unpacking the Source3-2- غیر بسته بندی منبع2.4.

    Decide On Your Local Path Policies4-2- تصمیم گیری در مورد سیاست های مسیر محلی2.5.

    Testing your installation5-2- تست نصب3.

    Setting Up Your Server to Run Java CGI Programs (the short form)3- تنظیم سرور برای اجرای برنامه های Java CGI (خلاصه)4.

    Executing a Java CGI Program4- اجرای یک برنامه Java CGI4.1.

    Obstacles to Running Java – Programs Under the CGI Model1-4- موانعی در اجرای برنامه های Java تحت مدلCGI4.2.

    Overcoming Problesm in Running Java CGI Programs2-4- حل مشکلات در اجرای برنامه های Java CGI5.

    Using the Java CGI Classes5- استفاده از کلاس های Java CGI5.1 CGI1-5- CGI5.2.

    CGI _ Test2-5- تست CHI5.3.

    Email3-5- ایمیل5.4.

    Emal_ Test4-5- تست- ایمیل5.5.

    HTML5-5- HTML5.6.

    HTML _ Test6-5- HTML- Test5.7.

    Text7-5- متن6.

    Future Plans6- طرح های بعدی7.

    Changes7- تغییرات7.1.

    Changes from 0.4 to 0.51-7- تغییرات 4/0 تا 5/07.2 Changes from 0.3.

    to 042-7- تغییرات 3/0 تا 4/07.3 Changes from 0.2.

    to 033-7- تغییرات 2/0 تا 3/07.4 Changes from 0.1.

    to 024-7- تغییرات 1/0 تا 2/01.

    Introcuction1- مقدمهBecause of the way that Java is designed the programmer does not have easy access to the system’s environment variables.

    Read further for details.به دلیل روشنی کهJava طراحی می شود، برنامه نویس دسترسی آسان به متغیرهای محیط سیستم ندارد.

    بعداً جزئیات را مطالعه کنید.Since I wrote the previous paragraph in 1996 , there have been many changes in the Java technology.

    It is likely that a better solution to running server – side Java programs is now available – perhaps your should take a look at servlets.از آنجا که پاراگراف قبلی را در 1996 نوشتم، تکنولوژیJava تغییرات زیادی یافته است.

    احتمالاً روش بهتری برای اجرای سرور وجود دارد، اکنون برنامه های جانبی جاوا در دسترس می باشد، شاید به سروست ها نظری اندازید.1.1.

    Prior Knowledge1-1- آگاهی قبلیI am assuming that you have a general knowledge of HTML and CGI concepts and at least a minimal knowledge of your HTTP server.

    You should also know how to program in Java, or a lot of this will not make sense.فرض می کنیم که آگاهی عمومی و کلی از مفاهیم HTML, CGI و حداقل، معلومات اندکی از سرورHTTP خود دارید.

    همچنین باید چگونگی برنامه نویسی به زبانJava را بدانید با مقدار زیادی از اینها معقولانه به نظر نمی رسد.1.2 This Document2-1- این مدرکThe latest version of this document can be read at http://www.orbits.com/software/Java_CGI.html.آخرین نسخه این مدرک را می توان در سایت http://www.orbits.com/software/ Java-CGI.html خواند.1.3 The Package3-1- بسته بندیThe latest version of the package described here can be accessed via anonymous FTP at ftp://ftp.orbits.com/pub/software/java_cgi-0.5.tgz.

    The package distribution includes SGML source for this document.می توان با FTP بی نام در سایت ftp://ftp.orbits.com/pub/soft ware/Java- Cgi-0.5.tgz به آخرین نسخه بسته شرح داده شده در اینجا دسترسی یافت.

    توزیع بسته بندی شامل منبع SGML این مدرک می شود.The package is distributed under the terms of the GNU Library General Public License.

    This document can be distributed under the terms of the Linux HOWTO copyright notice.بسته تحت شرایط گواهینامه عمومی کلی کتابخانه GNU توزیع می شود.

    این مدرک را می توان تحت شرایط نکته کپی رایت Linux HowTo منتشر کرد.If you use this software, please make some reference to http://www.orbits.com/software/Java _ CGI.html, so that others will be able to find the Java CGI classes.اگر از این نرم افزار استفاده می کنید، لطفاً به سایت http://www.orbits.com/software/ Java-CGI.html رجوع کنید بنابراین، دیگران قادر بوده تا کلاس های Java CGI را بیابند.I have run out of time to mainatain and support this package, so this will probably be its final release.

    If anyone out there is sufficiently enamoured of this software that they wish to take over the maintenace of it, please contact me at javacgi_document@orbits.com.برای حفظ و پشتیبانی این بسته زمان زیادی را صرف کردم، بنابراین احتمالاً این نسخه محصول نهایی آن خواهد بود.

    اگر فردی به حد کافی بر این نرم افزار علاقه مند باشد که بخواهد حفظ و نگهداری آن را بر عهده بگیرد، لطفاً با ایمیل javaCgi-dacument@ orbits .com با من تماس بگیرد.1.4 The Mailing List4-1- لیست میلI have created a majordomo list to allow people to help each-other work through their mutual problems in installing and using this software.

    Send a message to javacgi-request@orbits.com, containing the word subscribe.لیست برگی ساختم که به مردم اجازه دهد در طول مشکلات متقابل خود در نصب و استفاده این نرم افزار به یکدیگر کمک کنند.

    پیامی حاوی واژه اشتراک به ایمل java Cgi request@orbits.com ارسال نمائید.2.

    Setting Up Your Server to Run Java CGI Programs (With Explanations)2- تنظیم سرور برای برنامه های Java CGI (با توضیح)This section will lead you through installing my Java CGI package with copious explanations so that you know what the effects of your actions will be.

    If you just want to install the programs and don’t care about the whys & wherefores, skip to Setting Up Your Server to Run Java CGI Programs ( the short Form).این قسمت شما را از طریق نصب بسته Java CGI من با توضیحات فراوان راهنمایی می‌کند.

    اگر صرفاً می خواهید برنامه ها را نصب کرده و در مورد چراها و به چه علت ها نگران نباشید، به تنظیم سرور برای اجرای برنامه های Java CGI (به طور خلاصه) بروید.2.1 System Requirements1-2- ملزومات سیستمThis software should work on any unix-like web server that has the Java Development Kit installed.

    I am using it on a Debian Linux system running apache as the HTTP damon.

    If you find that it does not run on your server, please contact the mailing list.

    See The Mailing List for details.این نرم افزار باید در هر سرور وبunix مانندی کار کند که جعبه توسعه جاوای نصب شده دارد.

    از این نرم افزار در یک سیستم Debian Linux اجرا کننده apacho به عنوان دائمون HTTP استفاده می کنم.

    اگر فهمیدید که روی سرور شما کار نمی کند، لطفاً با لیست میل تماس بگیرید، برای جزئیات، لیست میل را ببینید.Unfortunatly, the Java run – time interpreter seems to be something of a memory hog – you may want to throw another few megabytes of RAM onto your server if you will be using Java CGI programs a lot.متأسفانه، مفسر زمان اجرای جاوا چیزی از هاگ حافظه به نظر می رسد.

    اگر از برنامه‌های Java CGI زیاد استفاده می کنید، شما بخواهید مگابایت های کم دیگری از RAM را به سرور خود اضافه کنید.2.2 Java CGI Add – On Software2-2- نرم افزار اضافه شده Java CGIThe software that I wrote to aid in this is called Java CGI.

    You can get it from ftp: ftp.orbits.

    com/upb/software/java_cgi-0.5.tgz.

    (the version number may have changed.)نرم افزاری که برای کمک به آن نوشتم Java CGIنامیده می شود، می توانید آن را از سایت ftp://ftp.orbits.com/pub/soft ware/Java- Cgi-0.5.tgz به دست آورید.

    (شماره نسخه می تواند تغییر کند).2.3 Unpacking the source3-2- غیر بسته ای کردن منبعFind a convenient directory to unpack this package into.

    (If you don’t already have a standard place to put packages, I suggest that you use/usr/local/src.

    Unpack the distribution with this command:دایرکتوری مناسبی بیابید تا این بسته را در آن باز کنید (اگر جای استانداردی برای قراردادن بسته ها ندارید، به شما پیشنهاد می کنم از /user/local/src استفاده کنید) بسته توزیع را با این فرمان باز کنید.Gzip-dc java – cgi – 0.5 tgz | tar – xvfGzip-dc java – cgi – 0.5 tgz | tar – xvfThis will creat a directory called java _ cgi – 0.5 In there you will find the files referenced in the rest of this document.

    (If the version number has changed, use the instruction from within that distribution from this point ont).این، دایرکتوریی به نام Java- Cgi-0.5.tgz را می سازد.

    در این دایرکتوری، فایل های ارجاع یافته به بقیه این مدارک را می یابید.

    (اگر شماره نسخه تغییر یافته است، دستور العمل های از داخل آن توزیع اینجا به بعد را به کار ببرید).2.4 Decide On Your Local Path Policies4-2- تصمیم گیری در مورد سیاست های مسیر محلیYou need to decide where you want your Java CGI programs to live.

    Generally, you will want to put them in a directory in parallel with you cgi – bin directory.

    My apache serve came configured to use /var/www/cgi-bin as the cgi-bin directory, so I use/var/www/javacgi as the directory to put Java CGI programs in.

    You probably do not want to put your Java CGI programs into one of the existing CLASSPATH directories Edit the Makdfile to reflect your system configuration.

    Make sure that you are logged in as the root user and run make install.

    This will compile the Java programs, modify the java .

    cgi script to fit in with your system and install the programs in the appropriate places.

    If you want the HTML version of this documentation and an HTML test document in additon, run make all instead.تصمیم گیری در مورد مکان قرارگیری و اجرای برنامه های Java-CGI ضروری است.

    عموماً می خواهید برنامه های Java-CGI را در یک دایرکتوری موازی با دایرکتوری Cgi-bin خود قرار دهید.

    سرورapache من پیکربندی شده تا از دایرکتوری /Var/www/java cgi را به عنوان دایرکتوری قرار گیری برنامه های Java-CGI به کار می گیریم.

    احتمالاً نمی خواهید برنامه های Java CGI را در یکی از دایرکتوری های CLASSPATH موجود قرار دهید.

    Make file را برای انعکاس پیکربندی سیستم خود ویرایش کنید.

    اطمینان یابید که به عنوان کاربر ریشه وارد شده Make install را اجرا کنید.

    این برنامه های Java را کامپایل می کند، فایل اسکریپت java.Cgi را متناسب با سیستم خود اصلاح نمایید و برنامه ها را در مکان مناسب نصب کنید.

    اگر نسخه HTML این پرونده و به علاوه پرونده تست HTML را می خواهید، فرمان make all را اجرا نمایید.2.5 Testing your installation.5-2- تست نصبInstalled from the distribution are HTML documents called javacgitest.html, javaemailtest.html and javahtmltest.

    Html.

    If you installed all in the previous section, it will be in the directiory you specified for WEBDIR in the Makefile.

    If you didn’t, you can run make test to build them from javacgitest.

    Html-dist, javaemailtest.html-dist and javahtmltest.html – dist.آنچه از طریق ارسال از شبکه نصب می شود پرونده هایHTML است که javacgitest.html , javahtml.html , javamail.html خوانده می شود.

    اگر همه (all) را در قسمت قبلی نصب کردید، در دایرکتوری قرار دارد که برای WEBDIR در Makefile مشخص کردید.

    اگر این کار را انجام ندادید،make test را اجرا کرده تا آنها را از javacgitest.html , javahtml.html , javamail.html بسازد.When you are sure that your installation is woriking correctly, you may wish to remove CGI _ Test.

    Class, Email_Test.

    Class and HTML _ Test.

    Class from your JAVACGI directory and javacgitest.

    Html, javaemailtest .

    html and javahtmltest.html from your WEBDIR directory as they show the user information that is normally only available to the server.وقتی مطمئن شدید که نصب شما به درستی کار می کند، ممکن است بخواهید HTMl- Test.Class,Email-Test.class,CGI-Test.Class را از دایرکتوری javacgitest.html, javahtml.html , javamail.html را از دایرکتوری WEBDIR حذف کنید.

    زیرا اطلاعات کاربری را نشان می دهند که به طور نرمال صرفاً در دسترس سرور است.3.

    Setting Up Your Server to Run Java CGI Programs (The Short Form).3- تنظیم سرور برای اجرای برنامه Java CGI (به طور خلاصه)Get the Java CGI package from ftp://ftp.orbits.com/upb/software/java_cgi-0.5 tgz.

    (The version number may have changed).بسته Java CGI را از سایت ftp://ftp.orbits.com/pub/software/Java- Cgi-0.5.tgz (ممکن است شماره نسخه تغییر کرده باشد).Unpack the distribution with this command:بسته ارسالی از طریق شبکه راه با این فرمان باز کنید:Gzip-dc java – cgi – 0.5.

    tgz | tar – vxfGzip-dc java – cgi – 0.5.

    tgz | tar – vxf(If the version number has changed, use the instructions from within that distribution from this point on.)(اگر شماره نسخه تغییر کرده است، از دستور العمل های داخل آن توزیع ارسال از شبکه استفاده کنید).Edit the Makefile you will find in the newly created directory java_ cgi_ 0.5 as appropriate to your system.با ویراش Java-Cgi-0.5, Makefile را در دایرکتوری اخیراً ساخته شده مناسب سیستم خواهید یافت.As root, run make install.

    This will compile the Java programs, apply your system – specific information and install the various files.

    If you want the HTML version of this documentation and an HTML test document, run make all instead.به عنوان ریشه، فرمان make install را اجرا کنید.

    این، برنامه های Java را کامپایل کرده، اطلاعات خاص سیستم شما را به کار برده و فایل های مختلف را نصب می کند.

    اگر نسخهHTML این پرونده و پرونده تست HTML را می خواهید، در مقابل make all را اجرا کنید.You should be ready to go.- باید برای جلو رفتن آماده باشید.4.

    Executing a Java CGI Program4- اجرای یک برنامه Java CGI4.1 Obstacles to Running Java Programs Under the CGI Model1-4- موانعی در اجرای برنامه های Java تحت مدل CGIThere are two main problems in running a Java program from a web server:دو مسئله عمده در اجرای برنامه جاوا از سرور وب وجود دارد:You can’t run Java programs like ordinary executables.- نمی توانید برنامه های جاوا را مثل برنامه های قابل اجرای عادی، اجرا کنید.You need to run the Java run – time interpreter and provide the initial class (program to run) on the command – line.

    With an HTML form, there is no provision for sending a command – line to the web server.لازم بوده مفسر زمان اجرای Java را اجرا کرده و کلاس اولیه (برنامه اجرا) را در خط فرمان ارائه دهید، با یک قالب HTML، هیچ وسیله ای برای ارسال خط فرمان به سرور وب وجود ندارد.Java does not have general access to the environment.- جاوا دسترسی عمومی به محیط ندارد.Every environment variable that will be needed by the Java program must be explicitly passed in.

    There is no method similar to the Cgetenv ( ) function.هر متغیر محیطی مورد نیاز برنامه جاوا را باید صریحاً عبور داد.

    هیچ روشی مشابه تابع Cgetenr () وجود ندارد.4.2 Overcoming Problems in Running Java CGI Programs2-4- حل مسائل و مشکلات برنامه های Java CGITo deal with these obstacles, I wrote a shell CGI program that provides the information needed by the Java interpreter.برای برخورد به این موانع، یک برنامه پیوسته CGI را نوشتم که اطلاعات مورد نیاز مفسر جاوا را ارائه می نماید.The java.cgi script.اسکریپت java.CgiThis shell script manages the interaction between the HTTP damon and the Java CGI program that you wish to use.

    It extracts the name of the program that you want to run from the server – provided data.

    It collects all of the environment data into a temporary file.

    Then, it runs the Java run-time interpreter with the name of the file of environment information and the program name added to the command – line.این فایل اسکریپتshell، رابطه متقابل بین دائمونHTTP و برنامه Java CGI را مدیریت می کند که می خواهید از آن استفاده نمایید.

    این فایل نام برنامه ای را استخراج می کند که می خواهید آن را از دیتای ارائه شده سرور اجرا نمایید.

    اسکریپت همه دیتاهای محیطی را در یک فایل موقت جمع می کند و سپس، مفسر زمان اجرای Java را با نام فایل اطالعات محیط و نام برنامه اضافه شده به خط فرمان را اجرا می کند.The java.cgi script was configured and installed in Decide On Your I Path Policies.فایل اسکریپت java.Cgi در قسمت تصمیم گیری در مورد سیاست های مسیر محلی پیکربندی و نصب می شود.Invoking java.cgi from an HTML form.تقاضای java.Cgi از یک قالب HTMLMy forms that use Java CGI programs specify a form action as follows:قالب های استفاده کننده از برنامه های java.cgi عمل قالب را بدین شرح مشخص می‌کند:Where / cgi-bin/is your local CGI binary directory , java .

    cgi is the Java front – end that allows us to run Java programs over the web and CGI _ Test is an example of the name of the Java program to run.که /cgi-bin/ دایرکتوری بنیادی CGI محلی شماست.

    Java-cgi نرم افزار نهایی جاوا بوده که به ما اجازه می دهد تا برنامه های java را در سراسر وب اجرا کنیم و CGI-Test مثالی از نام اجرای برنامه Java می باشد.5.

    Using the Java CGI Classes.5- استفاده از کلاس های Java CGIThere are currently three main classes supported – CGI, Email and HTML.

    I am considering adding classes to deal with MIME –formatted input and output – MIME in & Eout, respectively.در حال حاضر، سه کلاس عمده پشتیبانی می شود: HTML,Email, CGI.

    کلاس های اضافی را بررسی کرده تا به ترتیب به ورودی و خروجی قالب بندی شده MIMEin & MIMOut, MIME بپردازم.There are also a few support and test classes.

    CGI Test, Email_ Test and HTML _ Test are intended to be used to test your installation.

    They can also be used as a starting – point for your own Java programs which use this class library.

    The Text class is the superclass for both the Email and the HTML classes.بعلاوه، کلاس های تست و پشتیبانی اندکی وجود دارد.

    هدفHTML-Test, Email.Test,CGI,Test این است که در قسمت نصب شما به کار برود.

    آنها را همچنین می توان به عنوان یک نقطه شروع در برنامه های جاوایی به کار برد که از این کتابخانه کلاس استفاده می کند.

    کلاس Text، سوپرکلاس هر دو کلاس هایEmail,HTML می‌باشد.5.1 CGI1-5- CGIclass Syntaxترکیب کلاسpublic class CGIpublic class CGIClass Descriptionشرح کلاسThe CGI class holds the “CGI Information” – Environment variables set by the web server and the name/value sent from a form when its submit action is selected.

    All information is stored in a properties class object.کلاس CGI “اطلاعاتCGI”- متغیرهای محیطی تنظیم شده با سرور وب و مقدار/ نام ارسال شده از قالب وقتی عمل پیشنهادی (Submit) آن انتخاب می شود- را دربر می‌گیرد.

    همه اطلاعات از یک شیء کلاسProperties ذخیره می شود.This class is in the “ Orbits.net” package.این کلاس در بسته "Orbits,net" قرار دارد.Member Summary CGI ( ) // Constructor.

    GetNames ( ) // Get the list of names.

    Getvalue ( ) // Get from value by specifying name.خلاصه اعضاء CGI ( ) // Constructor.

    Getvalue ( ) // Get from value by specifying name.See Also CGI _ Testهمچنین ببینید CGI _ TestCGI ( )CGI ()Purpose Constructs an object which contains the available CGI data.

    Syntax Public CGI ( ) Descriptionهدف CGI () شئیی را می سازد که دیتای موجود CGI را دربر دارد.

    ترکیب Public CGI ( ) شرحWhen a CGI object is constructed, all available CGI information is sucked – up into storage local to the new object.وقتی یک شیء CGI ساخته می شود، همه اطلاعات موجودCGI در انبار محلی شیء جدید پشته می شود.GetNames ( )GetNames ( )PurposeهدفList the names which are defined to have corresponding values.فهرست نام هایی که برای برخورداری از مقادیر مشابه تعریف می شوند.SyntaxترکیبPublic Enumeration getKeys ( )Public Enumeration getKeys ( )DescriptionشرحProvides the full list of names for which coresponding values are defined.لیست کام نام هایی را ارائه می دهد که مقادیر متناظر برای آن نام ها تعریف می شود.ReturnsبازگشتAn Enumeration of all the names defined.Enumeration همه نام های تعریف شده.GetValue ( )getvaluer ()PurposeهدفRetrieves the value associated with the name specified.مقدار مرتبط با نام مشخص شده را برگشت می دهد.SyntaxترکیبPublic string getvalue (string name)Public string getvalue (string name)DescriptionشرحThis method provides the corespondence between the names and values sent from an HTML form.این روش تشابه و تناظر بین value,names ارسالی از یک قالبHTML را ارائه می‌دهد.ParameterپارامترNamenameThe key by which values are selected.کلیدی که به وسیله آن مقادیر انتخاب می شود.ReturnsنشانهA String containing the value.یکstring حاوی مقدار.5.2 CGI _ Test2-5- CGI-TestThis class provides both an example of how to use the CGI class and a test program which can be used to confirm that the Java CGI package is functioning correctly.این کلاس هم مثالی از چگونگی به کار گیری کلاس CGI و هم برنامه تستی را ارائه می‌دهد که می توان آن را در تائید عملکرد صحیح بسته Java CGI استفاده نمود.Member Summaryخلاصه اعضاءMain ( ) // Program main ( ).Main ( ) // Program main ( ).See Alsoهمچنین ببینیدCGICGIMain ( )Main ()PurposeهدفProvide a main ( ) methodارائه یک متد main ()GetValue ( )getvalue ()SyntaxترکیبPublic static void main (string argv [ ])Public static void main (string argv [ ])DescriptionشرحThis is the entry point for a CGI program which does nothing but return a list of the available name/value paris and their current values.این نقطه ورودی یک برنامهCGI بوده که هیچ کالی غیر از برگشت دادن لیستی از جفت‌های موجود نام/ مقدار (name/value) و مقادیر فعالی آنان انجام نمی دهند.ParameterپارامترArgv [ ]argv []Arguments passed to the program by the java.cgi script.

    Currently unused.آرگومان های ارسال شده به برنامه توسط اسکریپتjava.cgi فعلاً استفاده نمی شود.5.3 Email3-5- EmailClass Syntaxترکیب کلاسPublic class Email extends TextPublic class Email extends TextClass Descriptionشرح کلاسMessages are built up with the Text class add* ( ) methods and the e-mail-specific methods added by this class.

    When complete, the message is sent to its destination.پیام ها با متدهای add*()کلاسText و متدهای خاصemail اضافه شده توسط این کلاس ساخته می شود.

    وقتی پیام کامل شد، به مقصد ارسال می شود.This class is in the “Orbits.net” package.این کلاس در بسته "Orbits.net" قرار دارد.Member Summaryخلاصه اعضاءEmail ( ) // Constructor.

    Send ( ) // send the e-mail message.Email ( ) // Constructor.

    Send ( ) // send the e-mail message.See Alsoهمچنین ببینیدEmail_Test, TextEmail-Text,TextEmail ( )Email ()PurposeهدفConstructs an object which will contain an email message.شیءای را می سازد که پیام یک ایمیل را دربر دارد.SyntaxترکیبPublic Email ( )Public Email ( )DescriptionشرحSet up an empy message to be completed by the Email methods.یک پیام خالی را ساخته تا به وسیله متدهایEmail کامل گردد.See Alsoهمچنین ببینیدText..TextSend ( )Send ()PurposeهدفSend the e-mail message.ارسال یک پیام email.getvalue( )Getvalue ()SyntaxترکیبPublic void send ( )Public void send ( )DescriptionشرحThis formats and sends the message.

    If no destination address has been set, there is no action taken.پیام را قالب بندی و ارسال می کند.

    اگر هیچ آدرس مقصدی تنظیم نشود، هیچ عملی صورت نمی گیرد.SendTo( )SendTo( )PurposeهدفAdd a destination for this message.افزودن مقصد به این پیامSyntaxترکیبPublic string sendTo (string address)Public string sendTo (string address)DescriptionشرحAdd address to the list of destinations for this method.

    There is no set limit to the number of destination an e-mail message may have.

    I’m sure that if you build up the list large enough, you can exceed the size of the parameter list that Mail Transport Agent can accept or use up your memory.Parameter/AddressA destination to sen this message to.Subject ( )PurposeSet the subject for this message.SyntaxPublic void subject (string subject)DescriptionThis method sets the text for the e-mail’s subject : line If called more than once, the latest subject set is the one that is used.ParameterSubjectGetValue ( )The text of this message’s subject : line.5.4 Email _ TestThis class provides both an example of how to use the Email class and a test program which can be used to confirm that the Java CGI package is functioning correctly.Member SummaryMain ( ) // Program main ( )Email.Main ( )PurposeProvide a main ( ) methodSyntaxPublic static void main (string argv [ ] )DescriptionThis is the entry point for a CGI program which returns a list of the available name/value paris and their current values.

    It will also send this list to the address specified in the Email variable.ParameterArgv [ ]Arguments passed to the program by the java.

    Cgi script.

    Currently unused.5.5 HTMLclass syntaxpublic class HTML extend TextClass DescriptionMessages are built up with the Text class add* ( ) methods and the HTML – specific methods added by this class.

    When complete, the message is sent to its destination.Currently, there is no error checking to confirm that the list – building methods are being used in a correct order, so the programmer mus t take pains not to violate HTML syntax.Member SummaryMember SummaryHTML ( ) // constructor.

    Author ( ) //setSee AlsoHTML _ Test, TextHTML ( )PurposeConstructs an object which will contain an HTML message.GetValue ( )SyntaxPublic HTML ( )DescriptionSets up an empy message to be completed by the HTML methods.See AlsoText.Author ( )PurposeSet the name of the document author.Syntaxpublic void author (string author)DescriptionSet the name of the document author to author.Parameter/AuthorThe text to use as the author of this message.See AlsoTitle ( ).Definition List ( )PurposeStart a defintion listSyntaxPublic void definitionlist ( )DescriptionStart a definition list.

    A definition list is a list specialized so that each entry in the list is a term followed by the definition text for that term (The start of a definition list should be followd by the creation of (at least) one term/ text/text pair and a call to the endlist ( ) method .

    Note that, get value ( )Currently, lists cannot be nested.See AlsoDefinitionListTerm ( ), endList ( ), listItem( ).DefinitionListTerm ( )PurposeAdd a term to a definition list.SyntaxPublic void definitionListTerm ( )DescriptionAdd a term to a definition list.

    The text for the term part of the current list entry should be appended to the message after this method is called and before a corresponding listItem method is called.See AlsoSee AlsoDefinitionList ( ) , listItem( )EndList ( )PurposeEnd a listSyntaxPublic void endList ( )DescriptionEnd a list.

    This method closes out a list.

    Note that , currently , lists cannot be nested.See AlsoDefinitionList ( )Listitem ( )PurposeAdd an entry to a listSyntaxPublic void listItem ( )GetValue ( )Public void listItem ( string item)Public boolean listItem (String term, string item)DescriptionAdd an entry to a list.

    If the first form is used, the text for the current list item should be appended to the message after this method is called and before any other list methods are called.

    In the second and third forms, the item text is specified as a parameter to the method instead of (or in addition to) being appended to the message.

    The third form is specific to definition lists and provides both the term and the definition of the list entry.ParametersItemThe text of this list entryTermThe text of this definition list entry’s term part.See AlsoDefinitionList( ), definitionListTerm( ), endList( ).Send ( )PurposeSend the HTML message.SyntaxPublic void send ( )DescriptionSend the HTML messageTitle ( )PurposeSet the text for the document title.SyntaxPublic void title (String title)getValue ( )DescriptionSet the text for document title.ParameterTitleThe text of this messag’s title.See Alsoauthor ( ).5.6 HTML _ TestThis class provides both an example of how to use the HTML class and a test program which can be used to confirm that the Java CGI package is functioning correctly.Member SummaryMain // Program main ( ).See AlsoMain ( )PurposeProvide a main ( ) methodSyntaxPublic static void main ( string argv [ ])DescriptionThis is the entry point for a CGI program which returns a list of the available name/value paris in an HTML document, with each name/ value pair displayed in a definition list element.Parameterargv [ ]Arguments passed to the program by the java.cgi script.

    Currently unused.5.7 Textclass syntaxpublic abstract class textClass DescriptionThis class is the superclass of the Emai and HTML classes.

    Messages are built up with the methods in this class and completed and formatted with the methods in subclasses.GetValue( )This class is in the “Orbits.text” package.Member SummaryText ( ) // constructor.

    add ( ) // add text to thisSee AlsoEmail, HTML.add ( )PurposeAdd text to this item.SyntaxPublic void add (char addition)Public void add (string addition)Public void add (stringBuffer addition)DescriptionAdd addition to the contents of this text item.ParameterAdditionText to be added to the text item.See AlsoAddLineBreak ( ), addparagraph ( ).AddLineBreak ( )PurposeForce a line break at this point in the text.SyntaxPublic void addlineBreak ( )DescriptionAdd a line break to the text at the current point.See AlsoGetValue ( )Add ( ), addparagraph ( )addparagraph ( )PurposeStart a new paragraph.SyntaxPublic void add ( )DescriptionStart a new paragraph at this point in the text flow.See Also.add ( ), addLineBreak ( ).6.

    Future Plansadd to the Email class:Email (int capacity)Used when we know how much space the message will need to have allocated.SentTo (string [ ] address)Add a list of primary destinations to the e-mail message.Send Cc (String address)Add a Carbon-Copy destination to the e-mail message.Send Cc(string [ ] address)Add a list of carbon – copy destinations to the e-mail message.sendbcc (String address)Add a Blind carbon – copy destination to the e-mail message.SendBcc (string [ ] address)Add a list of blind carbon – copy destinations to the e-mail message.Add to the HTML class.HTML (int capacity)HTML (int capacity)Used when we know how much space the message will need to have allocated.getValue( )public void unorderedList ( )start an unordered list.Public void orderedList ( )Start an ordered listPublic void directoryList ( )Start a directory list.Public void menuList ( )Start a menu list.Void anchor (String anchor Name)Specify an anchor.Void link (string url, string text)Specify a link.Void applet (string url, string altText)Specify an applet link.Allow HTML lists to be nested.Add error checking code to enforce correct ordering of HTML list formatting codes.The location of the file of environment data should be configurable from the Makefile.Get rid of the spurious empty name/ value pair that appears in the list when we are dealing with the Get method of data trnsfer.Consider having CGI implement the java.

    Util.

    Enumeration interface to successively provide variable names.Add a Test class, which would use every method in this package.Document how CGI _ Test, Email_Test build on each other to provide incremental tests for debugging purposes.Document how test uses every feature available in this package.7.

    Changes7.1 Changes from 0.4 to 0.5changed documentation and comments to reflect the final nature of this release.7.2 changes from 0.3 to 0.4Fleashed out the HTML class to provide minimal functionality.Wrote the HTML _ Test class and javahtmltest.html-dist.Added the HTML methods to deal with a definition list.7.3 changes from 0.2 to 0.3Added the Text and Email classes.

    HTML was also added, but it is merely a stub at this point.Put the various classes into packages.

    The main classes are in Orbits.net.

    *, the support class Text is in Orbits.text.

    text.GetValue ( )Changed CGItest to CGI _ TestAdded the Email_Test class.7.4 changes from 0.1 to 0.2The environment variables are put into a temportary file instead of being crammed into the Java inperpreter command-line.

    The CGI class and java .

    cgi had to be modified.The javacgitest.html cocument is made part of the distribution.The text files which are modified by make upon installation are provided with names that end with –dist.

  • - مقدمه 1. Introduction
    2. Setting Up Your Server to Run Java CGI Programs (with Wxplanations)
    2- تنظیم سرور برای اجرای برنامه‌های Java CGI (با توضیح)
    3. Setting Up Your Server to Run Java CGI Programs (The Short Form)
    3- تنظیم سرور برای اجرای برنامه های Java CGI (مختصر)
    4- اجرای یک برنامه Java CGI 4. Executing a Java CGI Program
    5- استفاده از کلاس های Java CGI 5. Using the Java CGI Program
    6- طرح های بعدی 6. Future Plans
    7- تغییرات 7. Changes
    1- مقدمه 1- Introduction
    1-1- دانش قبلی 1.1. Prior Knowledge
    2-1- این مدرک 1.2. This Document
    3-1- بسته بندی 1.3. The Package
    4-1- لیست میل 1.4. The Mailing List
    2. Setting Up Your Server to Run Java CGI Programs (With Explanations)
    2- تنظیم سرور برای اجرای برنامه های Java CGI (با توضیح)
    1-2- ملزومات سیستم 2.1. System Requirements.
    2.2. Java CGI Add – On Software
    2-2- نرم افزار افزایشی Java CGI
    3-2- غیر بسته بندی منبع 2.3. Unpacking the Source
    2.4. Decide On Your Local Path Policies
    4-2- تصمیم گیری در مورد سیاست های مسیر محلی
    2.5. Testing your installation
    5-2- تست نصب
    3. Setting Up Your Server to Run Java CGI Programs (the short From)
    3- تنظیم سرور برای اجرای برنامه های Java CGI (خلاصه)
    4. Executing a Java CGI Program
    4- اجرای یک برنامه Java CGI
    4.1. Obstacles to Running Java
    1-4- موانعی در اجرای برنامه های Java تحت مدلCGI
    Programs Under the CGI Model
    You can’t run Java programs like ordinary executables
    Java does not have general access to the environment
    شما نمی توانید برنامه های جاوا را مثل برنامه های اجرایی عادی
    اجرا کنید.Java دسترسی عمومی به محیط ندارد.
    4.2. Overcoming Problems in Running Java CGI Programs
    2-4- حل مشکلات در اجرای برنامه های Java CGI
    اسکریپت Java- cgi The java cgi script.

    Invoking java cgi from an HTML form
    تقاضای Java-cgi از قالب HTML
    5. Using the Java CGI Classes
    5- استفاده از کلاس های Java CGI
    1-5- CGI 5.1 CGI
    ترکیب کلاس Class Syntax
    شرح کلاس Class Description
    خلاصه عضو Member Summary
    همچنین ببینید See Also
    CGI () CGI ( )
    Get Names () GetNames ( )
    Get Value () Getvalue ( )
    2-5- تست CHI 5.2. CGI Test
    خلاصه اعضاء Member Summary
    همچنین ببینید See Also
    main () Main ( )
    3-5- ایمیل 5.3. Email
    ترکیب کلاس Class syntax
    شرح کلاس Class Description
    خلاصه اعضاء Member Summary
    همچنین ببینید See Also
    Email () Email ()
    Send () Send ()
    Send to () Send to ()
    Subject () Subject ()
    4-5- تست- ایمیل 5.4. Email – test
    خلاصه اعضاء Member Summary
    همچنین ببینید See Also
    main () Main ( )
    5-5- HTML 5.5. HTML
    ترکیب کلاس Class Syntax
    شرح کلاس Class Description
    خلاصه اعضاء Member Summary
    همچنین ببینید See Also
    HTML () HTML ( )
    Author () Author ()
    Definition List ( ) Definition List ( )
    Definition List term ( ) Definition List term ( )
    EndList ( ) EndList ( )
    ListItem( ) ListItem( )
    Send ( ) Send ( )
    Title ( ) Title ( )
    6-5- HTML- Test 5.6. HTML – Test
    خلاصه اعضاء Member Summary
    همچنین ببینید See Also
    main () Main ( )
    7-5- متن 5.7. Text
    ترکیب کلاس Class Syntax
    شرح کلاس Class Description
    خلاصه اعضاء Member Summary
    همچنین ببینید See Also
    add () Add ( )
    add line Break () AddLine Break ( )
    add Paragraph () AddParagraph( )
    6- طرح های بعدی 6. Future Plans
    7- تغییرات 7. Changes
    1-7- تغییرات 4/0 تا 5/0 7.1. Changes from 0.4 to 0.5
    2-7- تغییرات 3/0 تا 4/0 7.2. Changes from 0.3 to 0.4
    3-7- تغییرات 2/0 تا 3/0 7.3. Changes from 0.2 to 0.3
    4-7- تغییرات 1/0 تا 2/0 7.4. Changes from 0.1 to 0.2
کلمات کلیدی: HTML - Java CGI - جاوا - جاوا سی جی آی

Because of the way that Java is designed the programmer does not have easy access to the system’s environment variables. Because of the way that the Java Development Kit (JDK) is set up, it is necessary to use multiple tokens to invoke a program, wh

به دليل روشني کهJava طراحي مي شود، برنامه نويس دسترسي آسان به متغيرهاي محيط سيستم ندارد. به دليل روشي که جعبه توسعه (JDK) تنظيم مي شود، استفاده از نشانه هاي چندگانه در استنتاج يک برنامه جديد ضروري است که به خوبي با قالب هاي استاندارد HTML روش CGI عم

دلایل ظهور سیستم های Application server : دلیل توسعه و بسط این سیستم ها در پاسخگویی گروههای عظیمی از کاربران نهفته است. توسعه دهندگان احتیاج به ابزاری داشتند که بتواند کلیه منابع سطح پایین مورد استفاده برنامه های کاربردی اینترنت را در قالبی منسجم و قابل استفاده کپسوله کند. به گونه ایی که ایجاد برنامه های کاربردی محاوره ایی و کار آمد، برای اینترنت به راحتی ممکن شود. از این دیدگاه ...

تار جهان گستر (Word Wide Web) دنياي عجيبي است که تکنولوژي هاي مربوط به آن ، اغلب بدون پشتيباني کافي ، عرضه مي شوند و کاربران اين تکنولوژي ها ، همه روزه با واژگان جديدي برخورد مي کنند که باعث سر درگمي آنها مي شوند. براي نمونه مي توان به رشد برنامه ه

برنامه‌نويسي رايانه در فرهنگ واژه غير متخصصين ممکن است به تمام پروژه ساخت نرم‌افزار يا برنامه? رايانه‌اي گفته شود. با اين همه برنامه‌نويسي تنها بخشي از فرآيند توسعه نرم‌افزار يا برنامه رايانه‌اي است. اهميت، توجه و منابع اختصاص داده شده به برنامه‌نوي

برنامه های کاربردی وب دسترسی پویای وب پیج های مبتنی برHTML از طریق یک مرورگر وب را ایجاد می کند. از آنجا که برنامه های کاربردیWeb Dbject شیء گرا بوده و به زبان جاوا نوشته می شود، برنامه کاربردی شماWeb page هایی را با ایجاد نمونه های شی ها به نام مؤلفه های وب به وجود می آورد. مؤلفه وب ترکیبی از زیرمجموعه هایWocomponent و قالبHTML جاوا است. مؤلفه های وب همه مؤلفه ها و عناصر ...

دو جنبه از XSL : تبدیلات XSL و اشیاء قالب بندی XSL XSL، در واقع دارای دو راستا می باشد، تبدیلات XSL یا XSLT (نگارش 1.0 که یک معرفی W3C است و نگارش 1.1 که ارائه شده است) و اشیاء قالب بندی XSL یا XSLFO. هر کدام هنگامی که واردکار با داده های XML می شوند، برای انجام وظایف متفاوتی طراحی می شوند. XSLT اجازه می دهد محتوای XML را بگیریم و به هر شکل دیگری تغییر دهیم، ممکن است آن شکل ...

در دنیای امروز که رفته رفته تمامی اعمالی که بشر انجام می دهد به صورت مجازی و از طریق اینترنت به منظور سهولت کار انجام می شود ، سایت های اینترنتی خود را به عنوان یکی از نیاز های انسان روز به روز بیشتر پیدا می کنند و هر شرکت ، نهاد ، مجموعه و هر شخصی برای نمایاندن خود به دیگران و گام برداشتن در جهت پیشرفت خویش ، نیازمند در اختیار داشتن وب سایتی می باشد . امروزه سایت های اینترنتی ...

همین چند سال پیش بود که تیم نرم افزاری دکتر جیمز گاسلینگ ( برنامه نویس ارشد شرکت سان سیستم ) ، "جاوا" را به عنوان یک پلت فرم برنامه نویسی قدرتمند ، قابل انعطاف و مستقل از سخت افزار به جهانیان عرضه نمودند. چندی بعد سرکار خانم دکتر کیم پولیکس از دیگر اعضاء تیم ، در یک مصاحبه مطبوعاتی و رسمی از برنامه ریزی بلند مدت شرکت سان، برای کاربرد گسترده جاوا در دنیای میکروکنترلها تا سیستم ...

خلاصه این مقاله تاریخچه جاوا و کاربردهای جاوا در اینترنت را شرح می دهد. جاوا یک زبان برنامه نویسی است که با استفاده از آن می توان برنامه های متنوعی را نوشت.بیشترین کاربرد جاوا در ایجاد اپلت هایی است که در کاوشگرهای وب قابل مشاهده هستند. قدرت جاوا در سادگی و استقال از آن از بستر سخت افزاری (چه در فایل منبع برنامه و چه در کد باینری آن) است. با جاوا می توان برنامه هایی را هم نوشت ...

ثبت سفارش
تعداد
عنوان محصول