Home Discussion Discuss: JSP Simple Examples

  • Jsp Examples_employeeclasspn May 30, 2011 at 12:42 AM

    package my; import java.sql.SQLException; import java.sql.*; public class employee { int emp_id ; String name,designation,location,project; public employee(){} public employee(int emp_id, String name,String designation,String location,String project) { this.emp_id=emp_id; this.name=name; this.designation=designation; this.location=location; this.project=project; } public int getEmp_id() { return emp_id; } public void setEmp_id(int empId) { emp_id = empId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDesignation() { return designation; } public void setDesignation(String designation) { this.designation = designation; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public String getProject() { return project; } public void setProject(String project) { this.project = project; } public static void save(employee e) { try { Statement st1 = CreateConnection.createConnection(); String str = "insert into employee values('"+e.getEmp_id()+"','"+e.getName()+"','"+e.getDesignation()+"','"+e.getLocation()+"','"+e.getProject()+"')"; st1.executeUpdate(str); CreateConnection.closeConnection(); } catch (SQLException e2) { // TODO Auto-generated catch block System.out.println("sql exception"); } } public void delete(int emp_id) { try { Statement st1 = CreateConnection.createConnection(); String str = "delete from employee where emp_id="+emp_id; st1.executeUpdate(str); CreateConnection.closeConnection(); } catch (SQLException e2) { // TODO Auto-generated catch block System.out.println("sql exception"); } } public void update(employee e) { try { Statement st1 = CreateConnection.createConnection(); String str = "update employee set name=e.getName(),designation=e.getDesignation(),location=e.getLocation(),project=e.getProject()"; st1.executeUpdate(str); CreateConnection.closeConnection(); } catch (SQLException e2) { // TODO Auto-generated catch block System.out.println("sql exception"); } } }

  • unlinked linksMono June 3, 2011 at 8:08 PM

    Saorry, but most of links in this page refers to "c:\document and settings\.....". please fix it. thanks

  • Jsp applicationsami September 7, 2011 at 9:38 AM

    I am new to jsp how to pass a value from one jsp page to another jsp page.give one example with details

  • Thank youAlex March 23, 2012 at 1:01 AM

    Thank you very much Rose India for these very very useful examples !

  • jsp prograja March 29, 2012 at 11:40 PM

    send me some jsp concept basic......

  • HiSamy September 12, 2012 at 9:10 PM

    Like the codings and used in the subject

  • JSPsaraswathi September 10, 2011 at 11:06 AM

    The programs are simple to learn and easy.

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
Related Articles
PHP Questions

simple examples
simple examples  hi,we want to print a comma between two words we put comma in double quotes .Is it correct 

PHP Tutorial

PHP Examples
In this section of PHP examples, the new bees will learn the basic examples of most common used functions. These examples will help to the experts too as assesing our codes, the programmers can develop simple to very complex programs 

Programming Tutorials

Javascript Examples
In this part of JavaScript examples, we have created a simple example which shows the use... JavaScript Examples     Clear cookie example Cookies can... this onBlur event handler, we have created a simple example here which 

JSP Tutorials

JSP Simple Examples
JSP Simple Examples Index 1. Creating a String In jsp we create a string as we does in a java. In jsp we can declare it inside the declaration directive 

HTML Questions

HTML form examples
HTML form examples  Hi, How to create a simple data entry form in HTML and use JavaScript to validate the same. Can anyone share html form examples code? Thanks   Hi, Please see the HTML form example page. Thanks 


JSP Simple Examples
to JSP Examples.      ... Objects EL is the JSP 2.0 Expression Language Interpreter from... Conditional Content on a JSP Page We make use of the condition 

Struts Questions

Struts Layout Examples - Struts
Struts Layout Examples  Hi, Iam trying to create tabbed pages using the struts layout tag. I see the tab names on the page but they cannot be clicked on. Im not able to find simple examples/explanation on it. Any help 

Hibernate Questions

Need Jar in the JPA examples
Need Jar in the JPA examples  JPA - tutorial is good, very easy to understand and simple. But to run the examples, the jar/helping files are needed. and how Hibernates are used in the JPA example? Thnaks Abhijit Das    

JSP Tutorials

JSP Simple Examples

Ajax Examples

Ajax Examples
Ajax Examples         Displaying Time: This example is simple one to understand Ajax with JSP. The objective of the example is to display the current date 

HTML Questions

Dynamic html examples
Dynamic html examples  Hi, What is Dynamic HTML? Explain with dynamic html examples. Thanks   Hi, DHTML stands for Dynamic HTML and is uses the HTML, JavaScript, DOM, & CSS in a program. Following is very simple 

Java Beginners

Simple java applet
Simple java applet  Create a Java applet to display your address on the screen. Use different colors for background and text   Please visit the following link: Applet Examples 

JDBC Questions

examples  Hi sir...... please send me the some of the examples on jdbc connection of mysql database in jsp. thanks for sending me the previews questions .   Hello Friend, Which type of connectivity examples do you 

EJB Questions

Simple EJB3.0 - EJB
Simple EJB3.0  Hi friends... I am new user... bean on servlet/jsp. thanQ  Hi Friend, Please visit the following links: http://www.roseindia.net/ejb/examples-of-StatelessBean.shtml http 

Enterprise Java

EJB 3.0 Tutorials: Learn EJB 3.0 with Simple Examples
EJB 3.0 Tutorials: Learn EJB 3.0 with Simple Examples Enterprise JavaBeans or EJB are server-side component architecture used to create and deploy robust... of simple examples integrated with codes. So, begin with Roseindia.net EJB 3.0 

Java Server Faces

JSF Examples
will find the examples like, how to get JSF, how to install JSF, how to create simple...JSF Examples In this section we will discuss about various examples of JSF. This section describes some important examples of JSF which will help you 

Ajax Examples

jQuery - jQuery Tutorials and examples
jQuery - jQuery Tutorials and examples       The largest collection of jQuery examples... created many examples of using jQuery. View the demo's here. Learn jQuery 


JPA Examples In Eclipse
JPA Examples In Eclipse       In the JPA Examples section we will provide you almost all the examples of JPA framework. This complete JPA tutorials will illustrate you 


MySQL Examples, Learn MySQL with examples.
the SQL examples using MySQL Database Server. These MySQL example SQL's tutorial... the different types of SQL Statements for managing you data.  Few examples... Loader Examples Mysql Loader Example is used to create the backup 

Ajax Examples

Ajax Examples
Ajax Examples       There are a few AJAX demos and examples on the web right now. While... alternate Ajax technique is dynamic script loading. The concept is simple: create 


Flex Examples
Flex Examples In this section we will see some examples in Flex. This section... the various examples in Flex which will help you in to understand that how... to validate your data in flex application. You will see here a simple example 


Java examples for beginners
you the simple form of examples of Java, which will highlight you the method...In this tutorial, you will be briefed about the word of Java examples, which... provides you the techniques of programming in the simple way with the help 


Simple Query on RDF file in Java
Simple Query on RDF file in Java   ..., generating RDF files and about RDF Iterators in the previous examples, so in this section we are going to describe how to run simple query on the RDF graph model 

JEE Technologies

JPA 2.1 CRUD examples
Learn how to create CRUD operation examples in JPA 2.1 In this section you... actually developing the examples. Following 4 concepts you should understand.... In case of Create operation we simple creates a new instance of " 

XML Tutorials

Java SAX Examples
Java SAX Examples       XML Well-Formed Verifier In this section we are going to develop a simple java... or not. Get XML Elements In this section you will learn to develop a simple java program 

JSP Tutorials

JSP Tutorial For Beginners With Examples
JSP Tutorial For Beginners With Examples In this section we will learn about... to add the dynamic content in JSP page. Examples that are given... supported web servers, a simple example etc. JSP Technology This section 

XML Tutorials

XSD Simple Elements
XSD Simple Elements       XML Schemas define the elements of  XML files.  XML  simple...; to a data type in order to limit its content. Defining a Simple Element The syntax 

Java Technology Tutorials

for java and JSP source files. The examples provided are: 1. Image Map 2. Menu...JSF EXAMPLES EXPLORED (Part-1)  by Farihah Noushene, B.E. (published... the examples provided by SUN, in the JSF package. The JSF1.1 can be downloaded form 


jQuery tutorial for beginners with examples
In this section we will create a simple Hello World example using jQuery... based application. Due to simple features and easy development, jQuery is very... library is designed to keep code simple, concise and reusable. It can be used 

Spring 3

NameMatchMethodPointcut Examples
.style1 { background-color: #FFFFCC; } NameMatchMethodPointcut Examples This NameMatchMethodPointcut matches for simple method name, its alternative is regexp patterns. Does not handle overloaded methods, in this all