You can use the following article for a guide who wants to learn PHP + JSP from scratch. Of course, before learning coding, you must install this and that. So I hope this article is useful.
Tool Requirements:
- Apache Server + PHP + MySQL Server
In this case, you can make AppServ 2.5.10, you can download it at http://www.AppServNetwork.com.
I purposely suggested using this, because to make it easy to configure, and at the same time in this installer there are Apache, PHP, and MySQL packages. - J2SE
As I explained in the previous Java Introduction, J2SE is a floating Java Edition, supports database connectivity, user interface design, input / output, and network programming and is included as the basic packages of the Java language. J2SE na you can donglod at http://java.sun.com/javase/downloads/index.jsp You can choose whichever package. The packages currently available are JDK 6 + Java EE, JDK 6 + JavaFX and JDK 6 + NetBeans 6.1.7. Everyone already has J2SE inside. But I advise you to just one bundle, not the separate ones (for example, JRE, or JDK). The problem is that someday you will definitely need it, unless your company has been installed previously. - Apache TomCat
In the future, JSP serper na, you can download it at http://tomcat.apache.org/index.html You can use the latest edition na. - Apache-TomCat Connector
Intention to connect Apache Serper and TomCat which you will install. Donglod Module na at http://tomcat.apache.org/download-connectors.cgi. Scroll down your browser, look for Tomcat Connectors JK 1.2> Binary Release, click the win32> jk-1.2.28 folder, where there are many SO module files, select nyang mod_jk-1.2.28-httpd-2.2.3.so - MySQL Connector / ODBC
This connector helps in connecting mysql database using ODBC, it can be for desktop / web based applications. Donglod connector at http://dev.mysql.com/downloads/connector/odbc/, take nyang bwat Windows 32 na. - MySQL Connector JAVA / JDBC
Konektor ini khusus digunakan oleh JAVA dalam mengakses database MySQL, baik Desktop based maupun web based. Silahkan donlod file mysql-connector-java-5.1.7-bin.jar di http://dev.mysql.com/downloads/connector/j/5.1.html
Installation stage
- Instalasi Apache Server + PHP + MySQL Server
Double click appserv-win32-2.5.10.exe which you already donglod, follow the na installation instructions.
Specify the address of the apache server drive and storage folder. In this case I make D: dreserv
Check all the services that we will need later.
Fill in the server name and email na
Type in MySQL Server password na, check InnoDB if needed.
The installation process starts …
Run Apache and MySQL services na. Then click Finish.
Type url> http: // localhost / in the browser, if it appears like this, it means your server is active - Install J2SE, Apache TomCat + JSP
Double click the JDK package that you already donglod, ntu ….. the logon coffee brewed: D … Follow the installation instructions.
Instalasi sukses! Klik finish.
To ensure that java is installed correctly, open your Windows CMD, then type java-version, if the java version gets a response, it means that java is successfully installed on your system.
Now, when we install Apache TomCat, so we can run JSP
Double click the apache tomcat na installation package, follow the instructions.
Use the Full Installation option.
Here the location of the tomcat guide is under the previous apache server folder.
Fill in the default port, username and password. For the port, I recommend using the 8080 port.
JRE detection, because we have previously installed the JDK with the JRE inside, the installation will automatically detect the location of the JRE path.
Installation process …
Check Run Apache Tomcat to immediately run Apache Tomcat na service
A moment later. the apache tomcta service is started. and you will see there is a try icon bwar monitor apache tomcat na.
Please open url> http: // localhost: 8080 if you open it like this, it means your Apache Tomcat installation was successful, and we can already run web applications using JSP.
- Configuration Apache-TomCat Connector
- Rename the mod_jk-1.2.28-httpd-2.2.3.so file to mod_jk.so, and copy it into the D: dreservApache2.2modules folder (adjust the location of your apache server folder earlier).
- Open file D: /dreserv/Apache2.2/conf/httpd.conf (configuration apache server) and add the following line:
-
Include "D:/dreserv/Tomcat5.5/conf/auto/mod_jk.conf"
- Open file D: /dreserv/Tomcat5.5/conf/server.xml and add the following line before the line:
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"/> <Listener className="org.apache.jk.config.ApacheConfig" modJk="D:/dreserv/Apache2.2/modules/mod_jk.so" />
- Create a file called workers.properties in the folder D: /dreserv/Apache2.2/conf. Type the code below and save it.
[logger] level=DEBUG file=D:/dreserv/Apache2.2/logs/jk2.log [config] file=D:/dreserv/Apache2.2/conf/workers.properties debug=0 debugEnv=0 [shm] file=D:/dreserv/Apache2.2/logs/jk2.shm size=1048576 # socket channel [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # worker for the connector [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [status:status] [uri:/status/*] worker=status:status [uri:/jsp-examples/*] worker=ajp13:localhost:8009 [uri:/*.jsp] worker=ajp13:localhost:8009
- Restart Tomcat na by right clicking on the tomcat monitor in the try icon, then selecting stop server, and selecting again by right clicking start server.
- Automatically, after restarting tomcat, two new directories named auto and jk will be created in the D: dreservTomcat5.5conf folder. Where there will be a mod_jk.conf file in the auto na folder.
- Finally, restart the apacher server, by clicking Start menu> AppServ> Control Server by Services> Apache Restart
- When testing whether the connector is working, open again http: // localhost: 8080 and http: // locahost
If two or two na appears, congratulations apache connector with tomcat is successful. To view na report, type http: //localhost/phpinfo.php
There you can search for mod_jk.so, now is the module active right?
- Instalasi MySQL Connector / ODBC
Double click na installer package, follow instructions.
- Configuration MySQL Connector JAVA / JDBC
Copy mysql-connector-java-5.1.7-bin.jar into the JRE Library folder. In this case, my JRE is in the H: / dreserv / jre6 / lib / ext folder (keep it according to your previous JDK installation folder.
Create CLASS PATH in My Computer – System – Data Environment:
H: /dreserv/jre6/lib/ext/mysql-connector-java-5.0.4-bin.jar;% CLASSPATH%;
Then click OK, until the window closes. Basically, you don’t need to restart, but if you want additional work: D just restart it then: D. - All installation is complete … happy working with Apache server that supports PHP, JSP and MySQL.
thxsss banget pak…
pak.. aku masih bingung…mw pilih java / .net
katanya java becoming new cobol ???
lalu kelemahan java itu banyak ???
pilih yg mn ya??
mohon pencerahanna….
@dedy
kalo dibandingkan antara java dengan .NET, guwe pasti pilih Java. Karena:
1. Front End bagus menggunakan PHP, sdkgn backend bagus menggunakan Java
2. Java memiliki kesamaan dalam konsep per-class an dengan PHP
3. Java adalah opensource yang CrossPlatform (bisa di OS mana aja)
4. Java memiliki banyak tim support sedunia, apa aja dan dimana aja bisa ditemukan solusi2 seperti thread, forum, dan tutorialnya banyak
mas,,, nhe daftar na bayar ap kagak???
pas pengen donlod di http://java.sun.com/javase/downloads/index.jsp di suruh daftar dulu,,
gratis gak tuh????
@qrisna
gratis mas 🙂 cuma memang pas mau download bakalan diminta bwat register, biasanya untuk mendata sumber downloader nya
owh gtu ya..makasih ya
kapan nhe tutorial photoshop yand baru dr.emi
ku tunggu
btw…
aku masih 16 tahun,
blom bsa di panggil mas-mas..
hehe…
Thanks bg dremi tutorial nya, oya ditunggu tutorial design web layout y,,,
mantap! aku pengen bgt belajar lebih dalam dengan yang namanya website…
Sippp mantab…..
jadi pingin nih blajar web dr.emi klau bisa downloadnya disini aja webnya dr.emi aplikasinya jadiin satu , bingung klau ambil satu2 saya masih blm paham .thx
@gats
mohon maaf download an nya ga bisa disimpen di hosting web dremi.info.
selain size file2nya gede, juga ada baiknya download an diperoleh langsung dari vendor nya saja.
siapa tau ada yang update/info baru tentang file2 download an nya 🙂
terimakasih, selamat belajar 🙂
Sangatttttt berguna artikel nya 🙂
Mas Buat CLASS PATH untuk Konfigurasi MySQL Connector JAVA / JDBC gmn?tolong dijelasin lebih detail.gt
thanx
@Oniell
Konfigurasi JDBC pada Windows:
Download Driver JDBC : mysql-connector-java-5.1.10.jar di http://dev.mysql.com/downloads/connector/j/5.1.html (rilis terakhir)
Coppy file mysql-connector-java-5.1.10.jar ke D:\java\j2sdk1.4.2\jre\lib\ext (sesuaikan)
Buat CLASS PATH di My Computer – System – Data Environment :
D:\java\j2sdk1.4.2\jre\lib\ext\mysql-connector-java-5.0.4-bin.jar;%CLASSPATH%
Makin banyak berkarya mas biar bisa kita makin banyak yang bisa di pelajari. Dan ini memang sangat berguna sekali bagi kami2 yang masih senang balajar:-d
thx doc, tutornya sangat membantu. btw, banner yg 125×125 dah saya buat. ada di side bar tukar link di sebelah kanan. mohon di cek. thx before….
@irenk
iye udah gw cek kok bero, ntu udah dipasang linknya mbro di dremi.
thanks
Oke mantap gan, thaks banyak sangat membantu banget ne tutor … 🙂
mas, saya tinggal 1 langkah saja, bikinnya CLASS PATH gmn? maksudnya my computer – system – data environmen gmn?
gw binggung disini
Semangat
mas yang ini D:/dreserv/Tomcat5.5/conf/auto/mod_jk.conf kok g ada ya ?
yang ada cman
catalina folder
dan yang lainnya adalah file (file mod_jk.conf g ad mas)
@angga drive “D:/dreserv” udah disesuaiin blum?
Aku sama Santoz mas,
” Buat CLASS PATH di My Computer – System – Data Environment ” itu apa yg diclick ato apa kita lakukan?? Di My Computer mana ada System ama Data Environment??
@otniel
lia gambar ini aja:
http://i846.photobucket.com/albums/ab22/dremiINFO/php-programming/envi.jpg
Thx b4..
Trus klo aku mau masuk ke phpmyadmin lwt localhost koq dimintain user ama password ya?? itu diisi apa?? aku isi admin, itu koq gak isa ya??
Makasih..
@Otniel hehe, dulu emang yang nginstalnya siapa?
kalo kamu pasti tau dong user+pass nya
Tapi untuk defaultnya, saat menginstall:
user: root
pass: (kosong)
mister saya sudah coba tutorialnya. tetapi saya instal dengan cara saya sendiri tidak seperti tutorial (d:/dserve) namun saya instal di C: dan beda folder antara appserv dan tomcat. ketika saya cek di phpinfo.php tidak muncul keterangan mod_jk nya. semua setting di tutorial sudah saya lakukan hanya saja berbeda folder. apakah pengaruh ya. sesungguhnya sangat membutuhkan tutorial ini hingga bisa konek database nya dan mampu menjalankan kedua server web nya
@kangmas
betul sekali, folder sangat mempengaruhi jalanna masing masing configurasi apache/tomcatnya. Khususnya pada Point No.3 Konfigurasi Apache-TomCat Connector
Double check lokasi mod_jk, dll. Sesuiakan path path yang menghubungkan file2 confignya, dalam tutorial, perhatikan path utamanya yang perlu diganti/disesuaikan dengan path di komputer sndiri, yakni “D:/dreserv/”
Selamat mencoba
oh ya mister. satu lagi nih. tentang koneksi database nya. kalo di appserv nya mudah diketahui dan otomatis konek ke databasenya hanya dengan lihat http://localhost/phpmyadmin. nah masalahnya yang di tomcat bagaimana? bagaimana cara melihat mysql nya bisa konek dengan JSP na, ketika semua configurasi sudah dilakukan. mohon berikan penjelasana koneksi jsp dan mysql di lihat dari tomcat na. biar lebih lega lagi nih perasaan.. tetu mister
@kangmas
dengan konfigurasi diatas, database yang terlihat di PHPMYADMIN adalah database yang sama jika diakses oleh aplikasi JSP nya. jadi sebetulnya database MySQL nya satu, dan dipake oleh aplikasi PHP dan JSP. Yang membedakan adalah, perintah koneksi dari masing2 bahasa. Perintah koneksi di PHP tentu saja berbeda dengan di JSP.
hatur nuhun sadayana mister.ternyata menarik sekali pengalaman configurasi dua server satu database. sebetulnya sudah lama saya coba instal dari versi lama dan hasilnya nihil. databasenya tidak bisa terkoneksi sama sekali dengan JSP. ternyata saya instal dua mysql dan gak jelas yang mana yang harus dijalankan. dengan tutorial ini jadi semakin mengerti dan mudah implemenstasina. lain waktu boleh maen ke tubagus ismail ya mister. pernah lima bulan kos disitu lo mister. hehehe. kiranya satu lagi mungkin bisa dijelaskan apa bedanya kalau pakai java J2SDK 1.4.2 dengan makai JSE versi yang baru ada di tutorial ?
Mas,,
kalo databasenya pake Ms Access, konfigurasinya gmn lagi ya???
Tolong Mas,,
ini bwat tugas bso slasa c… T~T
HELP…HELP…
ada tempat ngumpul ngumpulnya kagak ya?
makasih banyak atas infonya … gan
saya masih hrs banyak blajar
misi .. ah
mas terima kasih buat tutorialnya, dah aq coba tp bingung di tahap yang ke 3, yang ngerubah file httpd.conf dan server.xml..bisa tolong di perjelas lg ga mas?aq pake tomcat 7.0. kirim ke email jg ya mas cara2 nya..terima kasih..
maaf mau numpang nanya cara instalasi apache tomcat di windows 7 gmn yak?
makasiiii
🙂
pake netbeans aja berur biar gampang 😀
om, ada referensi untuk j2me Low Level user gag om?
@d1d1 ada nih, dulu dapet dari milist JUG
http://www.roseindia.net/j2me/
http://www.scribd.com/doc/16633694/Tutorial-J2ME-Client-Server-Database
http://www.java2s.com/Tutorial/Java/0430__J2ME/Catalog0430__J2ME.htm
http://ilmutif.blogspot.com/2009/03/tutorial-membuat-program-java-j2me-di.html
MERDEKA!!