[travel] Discover Banyuwangi, The Sunrise of Java

Banyuwangi, My Home Town is a city located among forest, mountains, and seas. This city located in the very east of Java island, we, just like Banyuwangi’s tag line as the SUNRISE OF JAVA, is the very fist place to see the sunrise before another city in Java. Banyuwangi has lots of natural and cultural potentials. there are lots of natural potential to explore, Banyuwangi has G-LAND (surfing place), national parks, and the infamous Blue Flame of Ijen Crater that has been attracting lots of tourist form all over the world. We also has lots of cultural ceremony, exotic dances and ethnic carnival that held annually.

And lately the government of Banyuwangi made this video to help you find out more about Banyuwangi and all of it’s potential that ready to explore. both natural and cultural potential isΒ  wrapped in one destination. so, discover Banyuwangi, exploring the beauty of nature and culture of Banyuwangi.

Welcome, To banyuwangi. The SUNRISE OF JAVA

Welcome The new Resident

My room have a new resident. a cute little panda with red lips. it is a ‘He’ (I don’t care even he has a red lip). I was having a hard time deciding it’s gender. is it a male or female, but I decided, it’s a ‘He’. And his name is Bento. I did come up with the name of ‘gau’ (g like in good) like how Vietnamese call bears. But then, I think he resemble my friend, so….. a name happen.. hahahahhaaaa…. bentooo, sit down. bentoooo don’t step on my computer. bentooooo lay down. Bento, don’t goofing around πŸ˜€

My Friend will be happy…. hahhahahaaaa…. \(^_^)/

Continue reading

[programming] Insert data into database with JSP via JSTL

I have lots of talented and reliable students around me, and I’m proud of them.Proud to meet them and teach them. I’m sooooo proud of them, wish they’ll have such a bright future ahead of them. I love them so much you know….. πŸ˜€

And tribute to Riedo Andy Kurniawan who helped me to work things out. heeheheee… We finally able to insert data into the database. I’ve been try various ways to insert form data into the database, all of those various ways was come to their Dead end. I searched over dozens of internet article related with this JSP things and failed. it was frustrating, I never try this hard to do such things in PHP, it makes me love PHP even more…. hahahahaaa…..

so here is the code to insert form data into the database via JSTL.

<%@ page import=”java.io.*,java.util.*,java.sql.*”%>
<%@ page import=”javax.servlet.http.*,javax.servlet.*” %>
<%@ taglib uri=”http://java.sun.com/jsp/jstl/core&#8221; prefix=”c”%>
<%@ taglib uri=”http://java.sun.com/jsp/jstl/sql&#8221; prefix=”sql”%>
<!DOCTYPE html>
<html>
<head>
<sql:setDataSource var=”snap” driver=”com.mysql.jdbc.Driver”
url=”jdbc:mysql://localhost:3306/data” user=”root” password=””
/>
<title>JSP Page</title>
</head>
<body><form method=”post”>
<table width=”228″ border=”1″>
<tr>
<td width=”54″>ID</td>
<td width=”8″>:</td>
<td width=”148″><label for=”nis”></label>
<input type=”text” name=”id” id=”id” /></td>
</tr>
<tr>
<td>NAMA</td>
<td>:</td>
<td><label for=”nama”></label>
<input type=”text” name=”nama” id=”nama” /></td>
</tr>
<tr>
<td>KELAS</td>
<td>:</td>
<td><label for=”alamat”></label>
<input type=”text” name=”kelas” id=”kelas” /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type=”submit” name=”submit” id=”submit” value=”Submit” /></td>
</tr>
</table>
</form>

<c:if test=”${pageContext.request.method==’POST’}”>
<c:catch var=”exception”>
<sql:update dataSource=”${snap}” var=”updatedTable”>
INSERT INTO siswa VALUES (?,?,?)
<sql:param value=”${param.id}” />
<sql:param value=”${param.nama}” />
<sql:param value=”${param.kelas}” />
</sql:update>
<c:if test=”${updatedTable>=1}”>
<span style=”font-weight:bold; color:green;” >Congratulations ! Data inserted
successfully.</span>
</c:if>
</c:catch>
<c:if test=”${exception!=null}”>
<c:out value=”Unable to insert data in database.” />
</c:if>
</c:if>
</body>
</html>