Ayto to tmhma 8a sas ka8odhghsei kata thn egkatastash toy paketoy moy Java CGI me af8ones epejhghseis etsi wste na gnwrizete poia 8a einai ta apotelesmata twn energeiwn sas. An aplws 8elete na egkatasthsete ta programmata kai den endiafereste ka8oloy gia ta giati kai gia poioys logoys, phgainete sthn Ry8mizontas ton Diakomisth sas na trexei programmata Java CGI (o suntomos tropos).
Ayto to logismiko 8a prepei na doyleuei se ka8e unix-like diakomisth istou poy exei egkatesthmeno to Java Development Kit. Egw to xrhsimopoiw se ena susthma Debian Linux poy trexei ton apache san daimona HTTP. An diapistwsete oti den trexei ston diko sas diakomisth, parakalw epikoinwnhste me th lista taxydromeioy. Deite th The Mailing List gia leptomereies.
Dystyxws, o Java run-time diermhneyths fainetai na einai kati san fataoulas mnhmhs -- isws na 8elete na rijete liga perissotera megabytes apo RAM ston ejyphrethth sas an 8a xrhsimopoieite polu programmata Java CGI.
To logismiko poy egraca gia na boh8hsei se ayto legetai Java CGI. Mporeite na to parete apo to ftp://ftp.orbits.com/pub/software/java_cgi-0.5.tgz. (O ari8mos ekdoshs mporei na exei allajei).
Breite enan katalogo poy sas boleuei ston opoio 8a jepaketarete ayto to paketo.
(An den exete akomh ena sta8ero topo na topo8eteite paketa, proteinw na
xrhsimopoihsete ton /usr/local/src
.)
3epaketarete th dianomh me ayth thn entolh:
gzip -dc java_cgi-0.5.tgz | tar -xvf -Ayth 8a dhmioyrghsei enan katalogo me onoma
java_cgi-0.5
.
Ekei mesa 8a breite ta arxeia poy anaferontai sto ypoloipo aytou toy eggrafoy.
(An o ari8mos ekdoshs exei allajei, xrhsimopoihste tis odhgies poy briskontai
sth dianomh poy katebasate).
Prepei na apofasisete pou 8elete na zoyn ta Java CGI programmata sas. Genika,
8a 8elete na ta topo8ethsete se enan katalogo parallhla me ton cgi-bin
katalogo sas.
O dikos moy diakomisths apache htan ry8mismenos na xrhsimopoihsei ton
/var/www/cgi-bin
san ton cgi-bin
katalogo, opote xrhsimopoiw ton
/var/www/javacgi
san ton katalogo poy topo8etw mesa ta Java CGI programmata.
Pi8anws na mh 8elete na topo8ethsete ta Java CGI programmata sas mesa se enan apo toys yparxontes
katalogoys CLASSPATH
.
Epejergasteite to Makefile wste na antikatoptrizetai h ru8mish toy systhmatos sas.
Epibebaiwste oti exete prosbash ws xrhsths root kai trejte thn entolh make install
.
Ayth 8a metaglwttisei ta Java programmata, 8a tropopoihsei to java.cgi
senario
gia na tairiazei me to susthma sas kai 8a egkatasthsei ta programmata sta aparaithta merh.
An 8elete thn HTML ekdosh ayths ths tekmhriwshs kai ena HTML test eggrafo
epipleon, trejte thn entolh make all
anti ayths.
Egkatesthmena apo th dianomh einai HTML eggrafa poy onomazontai
javacgitest.html
, javaemailtest.html
kai
javahtmltest.html
.
Ean ta egkatasthsate ola - all
sto prohgoumeno meros, 8a einai ston
katalogo poy ka8orisate gia WEBDIR sto Makefile
.
An den to kanate, mporeite na trejete thn entolh make test
gia na ta xtisete apo ta javacgitest.html-dist
, javaemailtest.html-dist
kai
javahtmltest.html-dist
.
Otan eiste sigoyroi pws h egkatastash sas doyleuei swsta, isws na epi8ymeite
na diagracete ta CGI_Test.class
, Email_Test.class
kai
HTML_Test.class
apo ton JAVACGI katalogo sas kai ta javacgitest.html
,
javaemailtest.html
kai javahtmltest.html
apo ton WEBDIR katalogo sas afou deixnoyn sto
xrhsth plhrofories poy einai kanonika mono dia8esimes ston diakomisth.