Html+jsp+database is enough to do the small operation

Html+jsp+database is enough to do the small operation

Hai ,

If u want to do simple insetion and data retrival operation throw jsp ?.you need not to bother about whole code.just u consentration on html,ajax,jsp,any db.here i am using db2.

Html for insertion:

 <form name="StudentForm" method="post" action="simple.jsp">



  <table border="1" width="30%">

  <tr>

   <td align="center" colspan="2">  <font face="Monotype" size="5">Registration</font></td>

  </tr>

  <tr>

  <td>  Student id: </td>  <td> <input type="text" name="sId"  size="20"></td>

  </tr>
  <tr>

  <td>  Student Name: </td>  <td> <input type="text" name="sName"  size="20"></td>

  </tr>
  <tr>

  <td>  Student Age: </td>  <td> <input type="text" name="sAge"  size="20" onKeyup="isInteger(this.value)"></td>

  </tr>

 <tr> 

  <td> Student Department: </td><td><input type="text" name="sDept" size="20" /></td>

  </tr>

  <tr>

  <td align="center" colspan="2"> <input type="submit"   value="Save" "




 <input type="button"   value="Cancle" >

 </td>

  </tr>
  </table>

  </form>
Jsp:Simple.jsp


<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>

<%@page import="java.sql.*"%>
<html>
<head>
</head>

<%
String sId = request.getParameter("sId");//read the data from html page and store sId variable
String sName = request.getParameter("sName");
String sAge = request.getParameter("sAge");
String sDept = request.getParameter("sDept");
String sId1 = request.getParameter("sId");
int f=Integer.parseInt(sAge);
out.println(sId);
out.println(sName);
out.println(sAge);
out.println(sDept);
out.println(f);

        Connection conn = null;
          ResultSet result = null;
         Statement stmt = null;
         String Query=" INSERT INTO STUD(S_SID,S_NAME,S_CONTACT,S_DEPT) VALUES ('"+sId+"','"+sName+"',"+f+",'"+sDept+"') ";

        // out.println(Query);
         try {

     Class.forName("com.ibm.db2.jcc.DB2Driver");

       conn = DriverManager.getConnection("jdbc:db2://59.145.105.55:50000/tsttrial","trialadm","trial123");
       out.println(conn);
        out.println("connection successfully");

        stmt =conn.createStatement();

        int r=stmt.executeUpdate(Query);
        out.println("Student information successfully inserted");
     }
     catch (SQLException e) {
         System.out.println("Error occurred " + e);
      }

%>

it is enough to data insertion....From G RameshNaidu.

View Answers









Related Tutorials/Questions & Answers:
Html+jsp+database is enough to do the small operation
Html+jsp+database is enough to do the small operation  Hai , If u want to do simple insetion and data retrival operation throw jsp ?.you need not to bother about whole code.just u consentration on html,ajax,jsp,any db.here i
RetController.java (do get) (my file for reference for a test.. IS LOGIC good Enough ?
RetController.java (do get) (my file for reference for a test.. IS LOGIC good Enough ?   try { Connection conn=Create_Connection.conOpen(); System.out.println(conn); String submit
Advertisements
how to do CRUDE operation in iphone?-RV
how to do CRUDE operation in iphone?-RV  .h file #import <...]; //[self RemoveData]; sqlite3 *database; static sqlite3_stmt * addStmt...) NSAssert1(0, @"Failed to create writable database file with message
ModuleNotFoundError: No module named 'enough'
ModuleNotFoundError: No module named 'enough'  Hi, My Python... 'enough' How to remove the ModuleNotFoundError: No module named 'enough'... to install padas library. You can install enough python with following command
ModuleNotFoundError: No module named 'enough'
ModuleNotFoundError: No module named 'enough'  Hi, My Python... 'enough' How to remove the ModuleNotFoundError: No module named 'enough'... to install padas library. You can install enough python with following command
ModuleNotFoundError: No module named 'enough'
ModuleNotFoundError: No module named 'enough'  Hi, My Python... 'enough' How to remove the ModuleNotFoundError: No module named 'enough'... to install padas library. You can install enough python with following command
Is Python enough for machine learning?
Is Python enough for machine learning?  Hi, I am beginner in Data...: Is Python enough for machine learning? Try to provide me good examples or tutorials links so that I can learn the topic "Is Python enough for machine
Is Python enough for data science?
Is Python enough for data science?  Hi, I am beginner in Data...: Is Python enough for data science? Try to provide me good examples or tutorials links so that I can learn the topic "Is Python enough for data science?"
Is codecademy enough to get a job?
Is codecademy enough to get a job?  Hi, I am beginner in Data...: Is codecademy enough to get a job? Try to provide me good examples or tutorials links so that I can learn the topic "Is codecademy enough to get a job?"
Is Python alone enough?
Is Python alone enough?  Hi, I am beginner in Data Science... enough? Try to provide me good examples or tutorials links so that I can learn the topic "Is Python alone enough?". Also tell me which is the good
Small clarification
Small clarification  This function is used to search and select particular word. In this function document.getElementById('d')); getElementById is used to get the element by using id,but here there is no id with 'd', what
ModuleNotFoundError: No module named 'small-small-hr'
ModuleNotFoundError: No module named 'small-small-hr'  Hi, My... named 'small-small-hr' How to remove the ModuleNotFoundError: No module named 'small-small-hr' error? Thanks   Hi, In your python
login/logout operation
login/logout operation  how to do log in/out operations in jsp plz kindly send the steps leing behind this operation...://www.roseindia.net/jsp/loginstatus.shtml http://www.roseindia.net/jsp
Is Python alone enough to get a job?
Is Python alone enough to get a job?  Hi, I am beginner in Data...: Is Python alone enough to get a job? Try to provide me good examples or tutorials links so that I can learn the topic "Is Python alone enough to get a job
login/logout operation
login/logout operation  how to do log in/out operations in jsp plz kindly send the steps leing behind this operation...://www.roseindia.net/jsp/loginstatus.shtml http://www.roseindia.net/jsp
ModuleNotFoundError: No module named 'small'
ModuleNotFoundError: No module named 'small'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'small' How to remove the ModuleNotFoundError: No module named 'small'
ModuleNotFoundError: No module named 'small'
ModuleNotFoundError: No module named 'small'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'small' How to remove the ModuleNotFoundError: No module named 'small'
ModuleNotFoundError: No module named 'insecure-but-secure-enough'
ModuleNotFoundError: No module named 'insecure-but-secure-enough'  Hi...: No module named 'insecure-but-secure-enough' How to remove the ModuleNotFoundError: No module named 'insecure-but-secure-enough' error? Thanks
Struts small complite project - Struts
Struts small complite project  I am a beginner in struts I want to do a project in Srtuts .can u please send me a small complete struts project . So that I can by taking the reference of that I can write good and effective
Small business administration classes
Small business administration classes  Hi, How Small business...   Hi, The manage of any small business are doing a lot of different types... process of the business. So, if you are a manager of small business then you
how to get small rectangular box or small window - JSP-Servlet
how to get small rectangular box or small window   Dear sir, First i am calling a one jsp in a url ,it will display that perticular jsp.In this jsp i am showing a one table ,that contains attributes like id,subject
search operation - Java Beginners
search operation  how to retrive all the similar elements (search operation ) on xml document using regular expressions
Search operation in JSP page
Search operation in JSP page  How to perform search in jsp with MYSQL database plz help me
small code - JDBC
small code  Hi Team, I want to write program for my team in this code i have list of websites when ever this site is down this code shows site is down message and if site is up it will give message site is up. Thanks
small query - JSP-Servlet
small query  how to set value to textbox on browser side which is retrived from the database?  Hi friend, Plz explain problem in details which technology you have used e.g. JSP/Servlet/Java etc... For more
Insert Operation Error - WebSevices
Insert Operation Error  Hai, How i store my full resume in database[Mysql] using PHP. Any one Know the code..... Help me
Java code for buffer operation...!!!
Java code for buffer operation...!!!  Implement a buffer operation using character array, storing last 100 characters inserted by user. Make method to get and retrieve???   The given code accepts the characters from
Small business management courses online
a small business organisation. However only education degree is not enough...Small business management courses online Small-scale business today has... for running a small-scale business or becoming a large business entrepreneur. Management
Searching operation in JAva
Searching operation in JAva  Sir, I have made a project... search using date, letter no., subject all at once. I'm using servlet and jsp...://www.roseindia.net/jsp/searchbook.shtml
Searching operation in JAva
Searching operation in JAva  Sir, I have made a project... search using date, letter no., subject all at once. I'm using servlet and jsp...://www.roseindia.net/jsp/searchbook.shtml
Searching operation in JAva
Searching operation in JAva  Sir, I have made a project... search using date, letter no., subject all at once. I'm using servlet and jsp...://www.roseindia.net/jsp/searchbook.shtml
arithmetic operation on float number
arithmetic operation on float number  hi here is my code class divs { public static void main(String args[]) { double dub=14.2f,dou; int num; num=(int)dub; dou=dub-num
Searching operation in JAva
Searching operation in JAva  Sir, I have made a project... search using date, letter no., subject all at once. I'm using servlet and jsp...://www.roseindia.net/jsp/searchbook.shtml
ModuleNotFoundError: No module named 'small-vision'
ModuleNotFoundError: No module named 'small-vision'  Hi, My Python... 'small-vision' How to remove the ModuleNotFoundError: No module named 'small-vision' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'SudachiDict-small'
ModuleNotFoundError: No module named 'SudachiDict-small'  Hi, My... named 'SudachiDict-small' How to remove the ModuleNotFoundError: No module named 'SudachiDict-small' error? Thanks   Hi, In your
Cloud Computing Solutions for Small Business
Cloud Computing Solutions for Small Business  Hi, Which Cloud Computing Solutions for Small Business is good. How to choose best Cloud Computing Solutions for Small Business. There are many small business around the world
ModuleNotFoundError: No module named 'kser-operation'
ModuleNotFoundError: No module named 'kser-operation'  Hi, My... named 'kser-operation' How to remove the ModuleNotFoundError: No module named 'kser-operation' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'Operation-Pluto'
ModuleNotFoundError: No module named 'Operation-Pluto'  Hi, My... named 'Operation-Pluto' How to remove the ModuleNotFoundError: No module named 'Operation-Pluto' error? Thanks   Hi, In your python
What are prospects of small Business management?
Small business management is the process by which all the available resources.... As by name, it is the case of small business management so such business activity starts with a very low cost and on a part time basis. Small business starts
Small program code - Java Beginners
Small program code  Develop the echo server and the echo client program that display whatever is typed in the server on to the client
Sql delete operation
get an answer.I used html anchor element for redirecting the page. i am using jsp with mysql 1.admincustdb.jsp : in this page contains only display the database... update delete update and delete are enclosed with html anchor element. if i
small java project - Java Beginners
small java project  i've just started using java at work and i need to get my self up to speed with it, can you give me a small java for beginners project to work on. your concern will be highly appreciated
small java project - Java Beginners
small java project  i've just started using java at work and i need to get my self up to speed with it, can you give me a small java for beginners project to work on. your concern will be highly appreciated
Small typo at SCJP Module-1 Question-6
Small typo at SCJP Module-1 Question-6  Hi Team, This is a awesome site which is serving lot of peoples in learning java effectivly, thanks alot for that, A small typo at "SCJP Module-1 Question-6", in spite of "a.method
Social Media Marketing for Small Business
Social Media Marketing for Small Business We are providing Social Media Marketing for Small Business and small website owners at very attractive cost. Our Social Media Marketing services for Small Business are well designed and gives
Small Business Marketing Services
Small Business Marketing Services These days Small Business around the work is looking for cheap, reliable and result oriented Small Business Marketing Services. The priority of Small Business is to find the best Small Business
Push and Pop operation of stack.
operation of stack. In the previous tutorial is clearly explained the push pop operation. The drawback of implementing stack is that the size of stack... n,value; do { do { printf("\nEnter the element to be pushed
A Cost-Effective Guide to Improving Cybersecurity for Small Businesses
on cybersecurity, leaving small and medium enterprises to make do with what little resources.... What can your small business do to minimize such a risk? For one, you can begin...A Cost-Effective Guide to Improving Cybersecurity for Small Businesses
Mysql Time Operation
Mysql Time Operation       Mysql Time Operation performs the subtraction and addition of time... Time Operation. To understand an example from Time Operation , we use keyword
do the following
do the following  write a program to enter the string and do the following 1- count totle number of vowel 2- replace vowel 3- delete the charactor from given value 4- riverce the string 5- convert second word in upercase 6

Ads