Skip to main content

Posts

$.ajax() in Java ? How to use Ajax in JSP Web page,

This is the best approach to implement Ajax in a web application, now $.ajax() mostly used to implement ajax operations because we can easily send data from one web page to another. we will use Jquery code to implement $.ajax() Syntax of Jquery $(document).ready(function(){ }); Syntax to implement .$ajax():- $.ajax({             type: "post",             url: "urlname", //this is my servlet             data: "args=" +value,             success: function(msg){                         output             }         }); Complete Code of Jquery with ajax on JSP Web page <%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%>     <%@page import="java.sql.*" %>    <%@page imp...

Navigation in React-JS

  Navigation means redirection from one web page to another. In this example i am describing how to navigate from one component to another from button click and pass data from one component to another with path data. React Router Dom provide <Routes> and <Route> Component to create path using <BrowserRouter>. It has a Link method to manage navigation through hyperlink. React Router Dom provide useNavigate() that is used to navigate from button click, we can pass data also using object pattern. Step 1st;- npm install react-router-dom Step2nd; create set of path under app.js import logo from './logo.svg' ; import './App.css' ; import { BrowserRouter , Routes , Route } from "react-router-dom" ; import Addprops from "./Addprops" import Subprops from "./Subprops" import Multiprops from "./Multiprops" import Divisionprops from "./Divisionprops" import Operation from './Operation'...

Job Alert for JAVA, QA, PYTHON and PHP Technology

Job Alert for JAVA, QA, PYTHON, and PHP Technology                                       

Program List to build logic

 Swift Program List, Check your swift Program Logic, Check Your String Logic Basic Program WAP to calculate the difference of two dates in the year, a date should be assigned on DDMMYYYY  12052016 13062019 o/p  2019-2016  3 WAP to calculate the sum of all digits in date of birth? WAP to Convert feet to inch and inch to feet? WAP to convert km to meter? WAP to convert decimal to binary? WAP to calculate basic, ta, da, comm, pf,  HRA, Leave, number of leave will be entered by the users? WAP to display the middle number is a three-digit number?  a 145,154,451    WAP to calculate Square and Cube of any assigned number? WAP to calculate electricity bill where unit price, total consumption, the extra load will be entered by the users? WAP to calculate Simple Interest where rate and time will be constant and the principal will be an integer? WAP to calculate the area of a triangle, circle, and rectangle in the same program where the value of pi, the base...

Disable back button code in JSP and Servlet?

To disable the back button, we will invalidate the session first under logout.JSP or servlet page Now I am writing a sample code of logout.jsp page <% session.removeAttribute("uid"); session.invalidate(); response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-store"); response.setHeader("Expires","0"); response.setDateHeader("Expires",-1); response.sendRedirect("../index.jsp"); %> Code of login.jsp page:- put this code on <head> section <% response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-store"); response.setHeader("Expires","0"); response.setDateHeader("Expires",-1); %> Write same code on Admin Dashboard (After login page)- <% response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-store")...

React-JS CRUD Operation using NODE JS API

In this example, I have described the complete process of creating API in Node JS and Consume into React JS Application. I have created a complete GRID System under-react js application using Login, Registration, Select, Insert, Update, and Delete Record. First Install NODE JS and React JS in Machine Create NODE JS Environment and React JS Project into System. Step first:- Create a Folder and run npm init  command Step2nd:- Create API using NODE JS before execution this code run the following command npm install express npm install bodyparser npm intsall cors npm install mongodb This code contains all APIs including Registration, Login, Create, Update, Find, Delete, and Select under Registration and Customer Table under the Mongo DB database. Create File using API-Example.JS const Express = require ( "express" ); const BodyParser = require ( "body-parser" ); var cors = require ( 'cors' ) const MongoClient = require ( "mongodb" ). MongoClien...