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 منتشر کرد.
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 با من تماس بگیرد.
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- نرم افزار افزایشی JavaCGI2.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