3:47 am - Monday June 25, 2018

Tag Archives: Tutorials

StringBuffer code for append(float f) in java

/** * @ Auther : Candidjava.com @ Description : Example for StringBuffer * append(float f) Method */ public class StringBufferExample5 { public static void main(String args[]) { // StringBuffer append(float f) method appends float...

StringBuffer code for append(double d) in java

/** * @ Auther : Candidjava.com @ Description : Example for StringBuffer * append(double d) Method */ public class StringBufferExample4 { public static void main(String args[]) { // StringBuffer append(double d) method appends double...

StringBuffer code for append(char[]str,int offset,int len) in java

/** * *@author:candidjava.com *@description:StringBuffer code for append(char[] str,int offset,int len)in *                           java */ public class StringBufferAppend { public static void main(String[]...

Page Directive info tutorial

Page Directive isThreadSafe tutorial

Page Directive session tutorial

Page Directive language tutorial

Implicit object exception tutorial

The Exception implicit object is of type java.lang.Throwable, to handle exception on jsp page make page directive isErrorPage to true and use exception implicit object to handle exception thrown on error page. <%@ page isErrorPage='true'...

Implicit object pageContext tutorial

The use of the pageContext is to include another resource or forward to another resource. Thus the following would forward from the current page to menu.jsp <% pageContext.forward("menu.jsp");%> <% pageContext.include("menu.jsp");%>

Implicit object page tutorial

Implicit object application tutorial

Implicit object config tutorial

Implicit object session tutorial

The session implicit object is an instance of javax.servlet.http.HttpSession, we can set the session true or false using page directive <% session.setAttribute(“key”,”value”); %>

Implicit object out tutorial

The out implicit object has a type of jsp.JspWriter. The out object can be used in a similar way to system.out is used in plain ordinary Java programs, i.e. <% out.print("Hello World");%>

Implicit object response tutorial

The response objects are the same as the parameters to doPost or doGet method in servlet and represent instances of HttpServletResponse. <% response.sendRedirect(“sam.jsp”);%>

Implicit object request tutorial

The request objects are the same as the parameters to doPost or doGet method in servlet and represent instances of HttpServletRequest. <% request.getParameter(“value”); %>

JSP forward tutorial with Example