Long time no see bro :D, udah lama ga posting ni gan maklum ane lagi sibuk dengan tugas β tugas kuliah yang berjibun, dan salah satunya tugas ini yang akan ane share kepada kalian.
Disini kita akan membuat login serta crud dengan menggunakan java servlet, sedikit gambaran mengenai alur dari project ini gan.
Kalian pasti sudah mengerti bukan gambaran alur diatas ? π ok langsung saja kita ketahap pembuatan projectnya, sebelumnya disini saya menggunakan editor netbeans dan servernya menggunakan glasfish 3.1.3, kalo agan sudah ada netbeannya mari silahkan dibuka dan ikuti tahap pembuatannya dibawah ini.
Pertama setelah kalian membuka netbeans, klik menu File->new Project lalu pilih sesuai gambar dibawah ini.
Setelah itu klik next lalu beri nama project sesuai keinginan kalian sebagai contoh disini saya menamakan project tersebut dengan βUTS Java Pemrogramanβ selanjutnya klik finish maka akan muncul struktur seperti gambar dibawah ini.
1. LOGIN FORM
Selanjutnya klik kanan pada source packages pilih new->servlet beri nama servlet tersebut βLoginβ klik next lalu checklist pilihan add information to deployment descriptor(web.xml) seperti gambar dibawah, setelah itu klik finish.
Setelah itu buka file login servlet tadi lalu ketikan codingan dibawah ini.
Maksud dari script diatas adalah component atau plugin yang kita perlukan untuk membuat login di java servlet ini, selanjutnya ketikan kembali code dibawah ini.
Maksud code dari string valid_name adalah username yang digunakan disaat akan login
begitu pula dengan string password adalah password yang digunakan untuk login
dan yang terakhir ada code_valid berfungsi untuk mengecek code yang valid
lanjut lagi gan ketikan codingan pada gambar dibawah ini
Fungsi dari script diatas adalah untuk menge cek session logout dan login, lanjut ketikan script dibawah ini.
Fungsi dari script diatas adalah kita membuat form login dengan tipe documentnya html, dan fung si username = request.getparameter adalah untuk mengambil data yang diketikan di text pada saat program tersebut dijalankan begitu juga dengan password dan login.
Lanjut lagi ketikan script dari form loginnya gan
Script diatas kita membuat output tampilan dari form lagin yang dipakai, selanjutnya ketikan kembali script dibwah ini
Script diatas berfungsi untuk membaca nilai dari username dan password yang di masukan jika username dan password benar maka akan muncul halaman form untuk crud jika tidak akan kembali lagi ke form login dan masukan username dan passworde dengan benar.
Setelah selesai mengetik script diatas maka tampilan yang di dapat akan seperti pada gambar dibawah ini.
Sebelumnya untuk menjalankan program tersebut kalian harus mengsetnya terlebih dahulu, yaitu dengan cara klik->Web Pages->web-inf->web.xml lalu pilih page dan isikan page tersebut sesuai dengan file yang ingin kalian munculkan ketika project pertama dijalankan contohnya disini yaitu βLoginβ
Jika sudah di setting maka klik kanan pada project lalu pilih->run maka akan muncul tampilan login seperti gambar diatas.
2. FORM CRUD
Selanjutnya kita buat untuk tampilan formnya, caranya sama seperti langkah pembuatan login diatas. Berikan nama file servletnya βFormβ lalu ketikan script dibawah ini.
Sama seperti login, script diatas adalah component/plugin yang diperlukan untuk membuat form crud ini. Lanjutkan script di bawah ini.
Fungsi dari script hastable diatas untuk menyimpan data kedalam table tetapi hanya bersifat sementara artinya tidak menggunakan database, sedangkan script dari string nim,nama dll adalah string yang diperlukan untuk mengambil value dan menampilkan data apa saja yang ingin kita munculkan di hastable.
Lanjut ketikan script dibawah ini gan.
Lanjut ketikan script dibawah ini gan.
Sama seperti diatas, Fungsi dari script diatas adalah untuk menge cek session logout dan login, jika kalian belum login maka akan terus di redirect ke form login. lanjut ketikan script dibawah ini.
Fungsi dari script string delete dan update diatas yaitu kita membuat generate link yang akan digunaka pada delete dan update yaitu βdelβ dan βupdβ. Sedangkan script yang dibawahnya adalah fungsi untuk mendelete data atau script deletenya :D. Selanjutnya ketikan kembali script dibawah ini.
Fungsi dari script diatas adalah fungsi dari script edit, data yang diambil ketika di edit adalah sesuai idnya, adapula fungsi dari equal untuk mengecheck radio button dan checkbock. Sedangkan maksud dari else yang terakhir itu jika datanya tidak dipilih maka kosong. Selanjutnya ketikan kembali script dibawah.
Script diatas adalah script dari tampilan form input yang akan digunakan, adapun fungsi string dibagian script terakhir berfungsi untuk mengambil parameter nilai yang diketikan ketika data di edit. Lanjut kembali ketikan script selanjutnya.
Script diatas adalah header data table yang akan digunakan.
Script diatas berfungsi untuk validasi, jika datanya kosong atau tidak lengkap maka datanya tidak bisa disimpan
Fungsi dari script diatas adalah untuk menampilkan data kedalam hastable sesuai dengan inputannya, dan programpun sekarang sudah bisa dijalankan :D.
Klik->Kanan pada project lalu pilih Run.
Dan untuk tampilan pada formnya serta file projectnya nanti saya update π maklum gan datanya ketinggalan -.-
Dan terimakasih sudah berkunjung ke blog saya semoga informasi ini bermanfaat.
Thanks for sharing informative article on java application development. Your post helped to understand the career in Java. JAVA Training in Chennai
Cloud computing is storing and accessing the large data sets over the internet instead of your PC computer. So that you can manage the data and program anywhere through the internet.
Regards..
Cloud Computing Training
Your blog is really useful for me. Thanks for sharing this informative blog. If anyone wants to get real time Oracle Training in Chennai reach FITA located at Chennai. They give professional and job oriented training for all students.
Thanks for sharing this information. Java is one of the popular object oriented programming language used for many of the multinational corporation. So learning Java Training in Chennai is really helpful to make a bright future.
Excellent post. Android is an open source operating system used for tablet computers and smartphones. If your are interested to develop creative mobile applications then you must learn about android OS. Its helpful for you.
Regards..
Android Training Institutes in Chennai
Nice information. Salesforce is a most powerful CRM tool used for manage all customers including potential customers. Salesforce Training in Chennai offering this course with experienced professionals.
This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing..
Regards,
PHP Training in Chennai
Really nice post. Unix is a multiuser and multi tasking operating system at the same time. Unix Course in Chennai offering real time Unix course at reasonable cost.
Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but itβs no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing dude.
Regards,
Web designing course in chennai
Really awesome blog. Software testing is a method of executing the application or program with the intent of searching the software errors. Software Testing Training in Chennai offering this course at reasonable cost.
There are lots of information about latest technology and how to get trained in them, like Hadoop Training Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(Hadoop Training in Chennai). By the way you are running a great blog. Thanks for sharing this.
Thanks for sharing this niche useful informative post to our knowledge, Actually SAP is ERP software that can be used in many companies for their day to day business activities it has great scope in future so do your sap training in Chennai
Regards,
sap course in Chennai|SAP Training Institute in Chennai|SAP institutes in chennai
Well post, Thanks for sharing this to our vision. In recent dayβs customer relationship play vital role to get good platform in business industry, Sales force crm tool helps you to maintain your customer relationship enhancement.
Regards,
Salesforce training institute in Chennai|Salesforce training |Salesforce courses in Chennai|Salesforce training in Chennai
There are lots of information about latest technology and how to get trained in them, like Hadoop Training in Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies Hadoop Training in Chennai By the way you are running a great blog. Thanks for sharing this blogs..
I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
SalesForce Training in Chennai
Pretty article! I found some useful information in your blog, it was awesome to read,
thanks for sharing this great content to my vision, keep sharing..
Unix Training In Chennai
This information is impressive..I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic
Android Training In Chennai In Chennai
SAP Training in Chennai
This post is really nice and informative. The explanation given is really comprehensive and informative..
Oracle Training in chennai
Thanks for sharing such a great information..Its really nice and informative..
Selenium Training in Chennai
Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..
Data warehousing Training in Chennai
I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly..
Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but itβs no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..
Websphere Training in Chennai
Oracle DBA Training in Chennai
Thanks for sharing this informative blog. I did Oracle DBA Certification in Greens Technology at Adyar. This is really useful for me to make a bright career..
Usually I am able to add links to other websites or pages within Informix Training In Chennai
Thanks for the useful information that was provided, Get more ideas on Sql Server Dba Training In Chennai
Thanks for sharing this informative blog. If anyone wants to get Struts Training In Chennai
It was really a wonderful article and I was really impressed by reading this blog.Oracle sql plsql Training In Chennai
This page is dedicated for our Greens Technologies Reviews by our students. Please give your reviews here, Qlikview Training In Chennai
I like this post, and i learn new software product. thank to share with us Oracle Rac Training In Chennai
Thanks for the worthy information Oracle Apps Technical Training In Chennai
This is very useful information. Thanks for sharing.Teradata Training In Chennai
Nice blog… I got very useful information. Java training Training In Chennai
fantastic presentation .We are charging very competitive in the market which helps to bring more oracle professionals into this market. may update this blog . Datastage Training In Chennai
I have read your blog and I got very useful and knowledgeable information from your blog. Itβs really a very nice article Spring training In Chennai
i gain the knowledge and industry oriented coaching available from greens technology chennai visit.Advanced oracle sql tuning Training In Chennai
Thank you for this wonderful information. It was really helpful.oracle dba training In Chennai
i wondered keep share this sites .if anyone wants realtime training Greens technology chennai in Adyar visit this blog..performance tuning training In Chennai
Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog
Oracle Apps Technical Online Training
Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
Oracle Training In Chennai
Job oriented form_reports training in Chennai is offered by our institue is mainly focused on real time and industry oriented. We provide training from beginnerβs level to advanced level techniques thought by our experts.
forms-reports Training in Chennai
Hadoop training in hyderabad.All the basic and get the full knowledge of hadoop.
hadoop training in hyderabad
Thanks for your informative article.
mongoDB training in chennai
Thanks for your informative article.
sas training in Chennai
Thank you for this wonderful information.
microstrategy training in chennai
This is very useful information. Thanks for sharing.
informatica training in chennai
nice informative Tulisan Blog – Best Spring Training in Chennai
looking for the best Core Java Training in Chennai Best Core Java Training in Chennai
very useful blogs.
hotels near us consulate chennai
hotels near apollo hospital chennai
hotels near uk embassy chennai
hotels near german consulate chennai
hotels near sankara nethralaya chennai
business class hotels in chennai
Thanks for sharing this valuable information.
java projects in chennai
dotnet projects in chennai
mba projects in chennai