3:53 pm - Monday March 25, 3286

Tag Archives: using

Java Example Program to display Numbers from 1 to N using For Loop

/*program to print numbers from 1 to N*/ /** * @author:candidjava.com * @Description:here, we are using for loop to print numbrs from 1 to N */ class For { public static void main(String args[]) { int i = 1; int N = 15; for...

Java Example Program to display Numbers from 1 to N using Do While Loop

/*program to print numbers from 1 to N*/ /** * @author:candidjava.com * @Description:here, we are using do...while loop to print numbrs from 1 to N */ public class DeeDoWhile { public static void main(String args[]) { int i...

Cookie example program using setHttpOnly() method to set cookie as http only

Cookie example program using isHttpOnly() method to Check whether the cookie has been run only in http protocol

Cookie example program using getVersion()/setVersion() methods to Get/Set the version of current protocol

GetVersion.java package com.candidjava; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Cookie example program using getValue()/setValue() methods to Get/Set the value of cookie

 GetValue.java package com.candid; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Cookie example program using setSecure() method to Set the browser to send files only throw secure protocol

 SetSecure.java package com.candid; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Cookie example program using getSecure()method to Check whether the browser send files only throw a secure protocol

GetSecure.java package com.candidjava; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Cookie example program using getPath()/setPath to Get/Set the cookie path

GetPath.java package com.candidjava; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Cookie example program using getName() to Get the name of the cookie

GetName.java package com.candidjava; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Cookie example program using getMaxAge()/setMaxAge() method to Get/Set the maximum age of cookie in seconds

GetMaxAge.java package com.candidjava; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Cookie example program using getDomain()/setDomain() method to Get/Set the domain name of cookie

GetDomain.java package com.candidjava; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Cookie example program using getComment(), setComment() methods to get or set a comment

GetComment.java package com.candidjava; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import...

Sample JDBC program using MySQL

Sample JDBC program using Oracle

Hibernate Struts Inserting Data Using Eclipse

  This application will use  join struts and hibernate applications. Here First  we will  get input from front view html or Jsp page. Then it will pass model and cotroller using struts application. Then In controller page input will save...

Hibernate servlet jsp inserting Data Using Eclipse

Hibernate integrate with Servlet: To integrate hibernate and servlet, Inputs are get through servlet class and pass values through argument to hibernate business logic class. <strong>SaveStudentControl ctrl = new SaveStudentControl();</strong> <strong>ctrl.addNewStudent(id,regNo,name,mark1,mark2,degree,mobNo,mailId);</strong> All...

Hibernate DB2 Using Eclipse

BACK

Hibernate Oracle Using Eclipse

• This explains Oracle data base in hibernate. Project structure:                       JarFiles:                         AddStudent.java: • Here we will use sessionFactory for create connetion Oracle database. sessionFactory...

Hibernate Mysql DataBase Using Eclipse

• This explains mysql database. Project Structure:                        JarFiles:                       AddStudent.java: •  Here we will use sessionFactory for create connetion My-Sql database. sessionFactory1...