Home Answers Viewqa Java-Beginners Html+jsp+database is enough to do the small operation

 
 


Ramesh Naidu
Html+jsp+database is enough to do the small operation
0 Answer(s)      a year and 8 months ago
Posted in : Java Beginners

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 Pages:
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
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
login/logout operation
login/logout operation  how to do log in/out operations in jsp plz kindly send the steps leing behind this operation...: http://www.roseindia.net/jsp/loginstatus.shtml http://www.roseindia.net/jsp
login/logout operation
login/logout operation  how to do log in/out operations in jsp plz kindly send the steps leing behind this operation...: http://www.roseindia.net/jsp/loginstatus.shtml http://www.roseindia.net/jsp
Software Consulting Revolutionizing The Way You Do Business
Software Consulting – Revolutionizing The Way You Do Business Running a business is hard enough but when it comes to one on the IT industry you had... to do these updates yourself. Hiring a consultant is the best way to go. Let
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
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
Best Cloud Computing Applications for Small Business
devices. Paycycle Small businesses or entrepreneurs do not always have... and expenses and surprisingly enough, all in real time. Zoho Creator Database management and customized database is always an area of concern for most small
Small businesses and social media marketing
Small businesses and social media marketing Social media marketing is so... to advertise. If you are a small business owner then there are a few things... different? The most important aspect when it comes to social media marketing for small
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
Small business management courses online
. However only education degree is not enough for successfully running a small...Small business management courses online Small-scale business today has... for running a small-scale business or becoming a large business entrepreneur. Management
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
Benefits of GPS tracking in small enterprises
Benefits of GPS tracking in small enterprises   ... a particular object or person while on operation or on rest. A GPS unit is fitted... for small fleet owners. Such sophisticated technology available at low cost
Human resources for small business
when it comes the matter of small-scale industries. Needless to say HR is also... and budgetary restrictions do not allow for the same. The lack of talented... it is difficult situation for the small-scale industries with its HR effect
PHP Mathematical Operation
Mathematical Operations in PHP PHP supports mathematical operations as other languages do. It support addition, subtraction, division, multiplication, increment, decrement etc. Example 1: <?php $a=25; $b=5; $c=$a+$b
Small Business SEO Writing,Best SEO Writing Services for Small Business - Rose India SEO Services
Solutions for Internet Marketing – Small Business SEO Writing Small businesses cannot easily carry out Internet marketing activities because..., then this work can be done all by yourself too. What Do You Understand
Damn Small Linux 2.3 RC2 has been released now
. About the Damn Small Damn Small is small enough and smart enough to do...Damn Small Linux 2.3 RC2 has been released now New auto mydsl - auto scan... into a Debian OS with a traditional hard drive install 6. Run light enough to power a 486DX
what is diffrence between the spring and ejb which is better for small application - Spring
what is diffrence between the spring and ejb which is better for small application  what is diffrence between the spring and ejb which is better for small application. and why do we need to use sping or ejb for web
Damn Small Linux 2.3 RC1 has been released now
Linux distribution. Damn Small is small enough and smart enough to do... Damn Small Linux 2.3 RC1 has been released now New check and prompt to save... into a Debian OS with a traditional hard drive install 6. Run light enough to power a 486DX
how to perform operation on data retrieved from database in jsp?
how to perform operation on data retrieved from database in jsp?  i... entered marks into the database from the jsp page and i can also retrieved data from database based on the input given but i want to do some addition operation
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
While and do-while
While and do-while       Nested classes Here is another advantage of the Java, object..., maintainable code-Nesting small classes within top-level classes places the code
My Favorite Java Books
later be used as a reference? What do the Amazon reviews say? If it was used... aren't going to give the absolute beginner a simple enough start, but if you... sometimes get obsessed with small features and completely lose sight of the big
Push and Pop operation of stack using linked list.
operation of stack using linked list. In the previous tutorial the stack operation in done using array. Code: # include <stdio.h> # include <... *top = NULL; int n,value; do { do { printf("Enter the element
Handling an iPad is Easy to Do
Handling an iPad is Easy to Do If there is one complaint that people can... tall by 7.47 inches wide. This should be good enough for anyone to see without... in a carrying case or backpack of sorts will be easy to handle thanks to the small depth
search operation - Java Beginners
search operation  how to retrive all the similar elements (search operation ) on xml document using regular expressions
DSL-N 0.1 Alpha is available
enough and smart enough to do the following things: 1. Boot from a business card...DSL-N 0.1 Alpha is available Damnsmall The Damn Small Linux project has released the first development build of DSL-N (Damn Small Linux Not), an enhanced
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
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
iPhone Do loop in Objective c
;= 11); } In this small do loop...iPhone Do loop in Objective c As you know, the concept of loop is almost same in objective c programming. So, here in this tutorial of "Do loop in Objective c
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
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
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
i have split a string by space ,done some operation and now how to properly order them for sending a mail in java or jsp - JSP-Servlet
i have split a string by space ,done some operation and now how to properly... a text area in that i typed a some matter this is in one jsp .Then i got that matter in another jsp and stored in a string using getParameter(),then i splitted
Date operation - JDBC
the solution.I dont ve any problem while inserting data from jsp to database.My Doubt is how i can cast the html text object into java.sql.object?ie..How i can cast the html text obj into sql Date obj?  Hi friend, registration
Insert Operation - WebSevices
more in details examples on "Pop Up Window" in jsp to visit.... http://www.roseindia.net/jsp/pop-window.shtml http://www.roseindia.net/jsp/popup-window
Social media marketing - frequently asked questions
marketing wasn't big enough, the hype and conversation surrounding it is even... employees to keep your profiles up and running. Can anyone do it? In theory... not really depend largely on how big or small your business is, or how popular
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
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
Mysql Time Operation
Mysql Time Operation       Mysql Time Operation performs the subtraction and addition of time. Understand with Example The Tutorial illustrate an example from Mysql Time Operation
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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.