Are You Recruiter/Hiring Manager?
Cloud-based Candidate Screening | Online Tests
PMP 1600 Questions
PMP 1600 Questions
1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc)

Tutorial Home


  • Advantage of Hibernate over JDBC
  • Hibernate Setup with an web Application
  • First Hibernate Application
  • Hibernate mapping with Database TABLE
  • Hibernate Data Type-Java Data Type - SQL Data Type mapping
  • One to Many Relation in Hibernate
  • One to Many Relation in Hibernate bi-directional
  • Many to Many Relation in Hibernate
  • HQL: The Hibernate Query Language
  • Criteria Queries
  • Criteria Queries : Equal (eq), Not Equal(ne), Less than (le), greater than (gt),greater than or equal(ge) and Ordering the results
  • Criteria Queries: And OR conditions
  • Hibernate generator to generate id (primary key)
  • prevent concurrent update in Hibernate,slate object updatation in Hibernate,version checking in Hibernate


  • Model View Controller (MVC)
  • Model View Controller (MVC)
  • Struts Flow-How Struts Works?
  • Struts Tutorial - Struts Setup- First Struts Action class setup
  • Message Resources
  • Validation Framework
  • Validation Framework-client side
  • ForwardAction
  • IncludeAction
  • DispatchAction
  • LookupDispatchAction
  • DynaActionForm
  • DynaActionForm
  • Struts Tutorial - Mutli-click prevention using struts tokens-Prevent Duplicate Submission
  • Logic Iterate Map and List


  • JSP Tutorial
  • Introduction to JSP
  • JSP Comments
  • JSP Syntax
  • JSP Scripting Elements :Scriptlet, expression, declaration
  • JSP Directives
  • implicit objects in JSP
  • JSP Actions
  • Introduction to JSP
  • jsp:useBean
  • The jsp:setProperty Action
  • The jsp:getProperty Action
  • Introduction to JSP


  • Spring Tutorial
  • Introduction to Spring
  • Benefits of Using Spring Framework
  • Inversion of Control in Spring
  • Introduction to BeanFactory
  • Dependency Injection in Spring
  • Collections Setter Injection
  • Bean Scopes in Spring
  • Spring IOC Setup Step by Step
  • Bean Lifecycle in Spring
  • ApplicationContext
  • MessageSources in Spring
  • Web Spring MVC framework
  • Developing Your First Spring Web Application
  • Developing Your Second Spring Web Application with Spring Form
  • Developing Your First Spring Web Application with Spring Validation Framework with Code Example
  • Spring integration with Hibernate
  • Struts Tutorial -- Code Examples

    Mutli-click prevention using struts tokens- Prevent Duplicate Submission

    saveToken() - generate the token key and save to request/session attribute.
    isTokenValid() - validate submitted token key against the 1 store in request/session.
    resetToken() - reset the token key
    Follow the steps to setup Mutli-click prevention using struts tokens.

    Step 1. Action Class where saveToken() before JSP Page.

    First saveToken() then forward to your jsp.
    Upon loading the form, invokes saveToken() on the action class to create and store the token key.
    Struts will store the generated key in request/session.

    public class LoadAction extends Action
    public ActionForward execute(ActionMapping mapping,ActionForm form,
    HttpServletRequest request,HttpServletResponse response)
    { ActionForward forward;
    forward=mapping.findForward("empformpage");// this is the jsp page where you want to struts tokens.
    return forward;

    Step 2. Store Token key as a hidden field: ( empform.jsp)

    In the browser if you type :
    This will call execute() method of LoadAction.
    Then saveToken(request);//create and store the token key
    and mapping.findForward("empformpage"); forward to empform.jsp (below code is for empform.jsp)

    <%@ page import="org.apache.struts.action.Action"%>
    <%@ page import="org.apache.struts.taglib.html.Constants"%>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html:form name="MyForm" method="post" action="/">
    <html:text property="firstName" size="20" maxlength="50"/>
    <input type="hidden" name="<%= Constants.TOKEN_KEY %>"
    value="<%= session.getAttribute(Action.TRANSACTION_TOKEN_KEY) %>" >
    <html:submit >Save</html:submit>

    Step 3. Check Token is Valid ?

    Once the form submitted, invokes isTokenValid() on the action class,
    it will validate the submitted token key(hidden field) with the token key stored previously on request/session.
    If match, it will return true.
    public class SubmitAction extends Action
    public ActionForward execute(ActionMapping mapping ,ActionForm form ,HttpServletRequest request,
    HttpServletResponse response)
    EmpForm frm=(EmpForm)form;
    { // This is Not Duplicate Submission of the form
    // You can add your logic here
    return mapping.findForward("sucess");
    { // This is Duplicate Submission of the form
    // Return to the JSP to display the error message ( This is Duplicate Submission);
    return mapping.findForward("duplicatesubmitpage");
    The information you are posting should be related to java and ORACLE technology. Not political.