JSP / CATATAN</>↗JSP21 Agt 2012
In this example you will learn how to set and get the value of Java object properties that you define in a JSP pages. For this example, let’s first start by creating a variable that we named customer, that will have a type of Customer class. To create this variable we use the <jsp:useBean> action. […]
JSP / CATATAN</>↗JSP20 Agt 2012
With the introduction of Expression Language in JSP 2.0 it is recommended to use the EL instead of using a scripting elements / scriptlets. That means if we want to access a server-side objects it is recommended to use EL then to write some Java codes in the JSP pages. For this purpose in JSP […]
JSP / CATATAN</>↗JSP17 Agt 2012
In this example you’ll see how to add comments in JSP page / JSP scriptlets. To add comments we can use either the JSP comment style or HTML comment style. The different between this is that the HTML comment will be sent or included in the webpage while the JSP comment is not included in […]
JSP / CATATAN</>↗JSP17 Agt 2012
There are three types of scripting elements available when writing a JSP page. These scripting elements includes: Scriptlets which is a block of Java code. Expression that can be evaluated and the result is printed out. Declarations can be used to declares variables or methods. Scriptlets A scriptlets is a block of Java code that […]
SERVLET / CATATAN</>↗Servlet16 Agt 2012
The Servlet API doesn’t provide a direct way to delete a cookie in a Servlet application. If you want to delete a cookie you have to create a cookie that have the same name with the cookie that you want to delete and set the value to an empty string. You also need to set […]
XML / CATATAN</>↗XML14 Agt 2012
In this example you will learn how to define a bean’s / pojo’s properties as an XML attribute in JAXB. To define properties as an XML attribute we use the @XmlAttribute annotation. In the Student class below the id property will be defined as an attribute of the student root element. While the name and […]