Home Answers Viewqa JSP-Servlet can u plz explain the http request methods

 
 


rkr
can u plz explain the http request methods
1 Answer(s)      4 years and 3 months ago
Posted in : JSP-Servlet

View Answers

March 9, 2009 at 2:36 AM


Hi friend,

public interface HttpServletRequest
extends ServletRequest
Extends the ServletRequest interface to provide request information for HTTP servlets.
The servlet container creates an HttpServletRequest object and passes it as an argument
to the servlet's service methods (doGet, doPost, etc).


Remove duplicate record :

MySQL remove duplicate

To remove duplicate entries in the MySQL database we can follow one of these following approach:

First approach is that we have to write three manual steps to create
the new backup table with unique entries then we will remove the older table and at
last we will rename the backup table with the same name of the older table that we have deleted.
Here is the explanation with the query :

To explain use we have to create a table which consists duplicate entries :
Query

CREATE TABLE `users` (
`id` int(11) NOT NULL,
`username` varchar(50) default NULL,
`password` varchar(50) default NULL,
`email` varchar(50) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `users` */

insert into `users`(`id`,`username`,`password`,`email`)
values (1,'Ankur','ankur','ankur@yahoo.com'),
(2,'Sam','sam','sam@yahoo.com'),
(3,'Xavior','xavior','xav@yahoo.com'),
(1,'Suman','suman','suman@one.com');

select * from users;

Output

+----+----------+----------+-----------------+
| id | username | password | email |
+----+----------+----------+-----------------+
| 1 | Ankur | ankur | ankur@yahoo.com |
| 2 | Sam | sam | sam@yahoo.com |
| 3 | Xavior | xavior | xav@yahoo.com |
| 1 | Suman | suman | suman@one.com |
+----+----------+----------+-----------------+
4 rows in set (0.00 sec)

Now to remove duplicate entries we can execute following query:
Query

CREATE TABLE backup_table AS
SELECT * FROM users WHERE 1 GROUP BY id ;
DROP TABLE users;
RENAME TABLE backup_table TO users;

Output

+----+----------+----------+-----------------+
| id | username | password | email |
+----+----------+----------+-----------------+
| 1 | Ankur | ankur | ankur@yahoo.com |
| 2 | Sam | sam | sam@yahoo.com |
| 3 | Xavior | xavior | xav@yahoo.com |
+----+----------+----------+-----------------+

Second approach to remove duplicate entries from the database table is
very simple and is extremely quick way to remove duplicates. Here is the query :
Query

ALTER IGNORE TABLE users ADD UNIQUE INDEX(id);

Output

+----+----------+----------+-----------------+
| id | username | password | email |
+----+----------+----------+-----------------+
| 1 | Ankur | ankur | ankur@yahoo.com |
| 2 | Sam | sam | sam@yahoo.com |
| 3 | Xavior | xavior | xav@yahoo.com |
+----+----------+----------+-----------------+

In the above query we have added unique index for id.









Related Pages:
can u plz explain the http request methods - JSP-Servlet
can u plz explain the http request methods  can u plz explain http request methods? as well in jdbc...how to delete the duplicate records in database... ServletRequest Extends the ServletRequest interface to provide request information
plz explain me the output of program - Java Beginners
plz explain me the output of program  Hi friends, can u please explain me the output of below program with proper explanation of each and every line... Three integer variables(a,b,c) and three methods have been defined
Can u Look to the error plz - Java Beginners
Can u Look to the error plz  this is my code can u modify it plz and give me the result of it when u check it on eclipse or jcreator plz and i will be more thankfull if u do that :) , oh yeh one thing can you draw a flag
can u plz try this program - Java Beginners
can u plz try this program  Write a small record management application for a school. Tasks will be Add Record, Edit Record, Delete Record, List Records. Each Record contains: Name(max 100 char), Age, Notes(No Maximum Limit
Explain Transparent Persistence - Hibernate
Explain Transparent Persistence   Hi Friends, Can u plz explain Transparent Persistence briefly  Hi Follow this link to find solution of your problem... http://www.roseindia.net/jdotutorials/jdo
plz help me any one as fast as u can
plz help me any one as fast as u can  A thief Muthhooswamy planned... is the number of metres he can jump (1<=climbUp<=10^10) climbDown... Sample Input 1: 10:1:1:{10} Here Muthooswamy can jump 10 metres height
Java Servlet : Http Request Headers
Java Servlet : Http Request Headers In this tutorial, you will learn how to Http Request Headers works in java servlet. Http Request Headers : HTTP Request Header is a request line text that a HTTP client(eg. web browser)sends
HTTP Protocol
the communication generally takes place over a TCP/IP protocol. HTTP Request Methods: 1... the Http methods to which the thing at the requested URL can respond. 7) PUT Method... methods of http protocols which are rarely used by they have been given here
How to fireup HTTP request from JavaFX Client
How to fireup HTTP request from JavaFX Client  Please tel me how do I can fire HTTP post request from an JavaFX client. Sceneario: I've an JavaFX... i've working version of JSP Code to handle HTTP post request tested by posting
can u plz help out how to attach file directly & send to a particular mail id
can u plz help out how to attach file directly & send to a particular mail id  i am building a project online LEAVE MANAGEMENT SYSTEM to our coll mini project so if a faculty write all details abt leave & shd send to HOD
How to get country locale from a http request
How to get country locale from a http request  Hi, I Have a requirement like , i need to get the country locale(from whcih country he is logged... to implement business logic. Can anyone help me out to get this done. any help
Retrieve HTTP Request Headers using JSP
Retrieve HTTP Request Headers using JSP   ... the request headers. When a HTTP client sends a request, it is required to supply GET...-Alive value or gets a  request line indicating HTTP 1.1, it may
Request Object In JSP
to the server by an HTTP request. Let if you submit the html form with some data to be send to the server, is received by the HTTP request object of the JSP. To access the HTML form data we use the request object and it's several methods like
Creating methods in servlets - JSP-Servlet
); /** /** * Processes requests for both HTTP GET and POST methods. * @param request servlet... { processRequest(request, response); } /** * Handles the HTTP POST...Creating methods in servlets  I created servlet and jsp file.I
JMeter HTTP request example
JMeter HTTP request example  Concerning: http://www.roseindia.net/jmeter/using-jmeter.shtml how do I set path? also what do i need to do to get the helloworld servlet work? Thanks in advance
explain this method
explain this method   i hope any one can explain this method ` private void showMonth(int m, int y) { int lead_spaces = 0; if (m...(); } plz help me
can u help me to get a calendar with color codes on days ???
can u help me to get a calendar with color codes on days ???  hi roseindia, Can you help me to get the code, I need a calendar with color codes.i,e....... NOTE:Its a calendar not a date-picker PLZ can you help me, its very urgent
plz Help me - Java Beginners
plz Help me  Hi, I want learn struts,I dont have any idea about this plz help how can i make a framework.If u have any information then plz send my personal id plz tell me that whose software installed.and give me brief
Specific Request Headers in JSP
Specific Request Headers in JSP          Whenever an http client sends a request, it can also sends the headers with it. All the headers are optional except
Explain final class, abstract class and super class.
Explain final class, abstract class and super class.  Explain final class, abstract class and super class.   Explain final class, abstract... implicitly has all the methods as final, but not necessarily the data members
please explain this prog
please explain this prog  can u explain this import java.io.*; class SString{ public static void main(String ar[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in
Explain struts.jar file - Struts
Explain struts.jar file   Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain
JavaScript XML Http Request
JavaScript XML Http Request  ...;, url, true) to make a GET request for the given url 'data.xml'. It provides...; Here is the code: <html> <h2>XML HTTP Request<
compre request dispatcher and send redirectmethod - Framework
compre request dispatcher and send redirectmethod  compre request dispatcher and send redirectmethod  Hi I am sending a link where u will found in details about RequestDispatcher vs sendRedirect methods. http
GET and POST Method of HTTP
method is more powerful request. By using Post we can request as well as send... it by using the post method.  There are few more rarely used http methods... GET  and POST Method of HTTP   
explain servletconfig with programiing example?
explain servletconfig with programiing example?  explain... initialization. All of its initialization parameters can ONLY be set in deployment descriptor. For more information, visit the following link: http
Request Headers In EL
Request Headers In EL          Whenever an http client sends a request...; <h1>By using the EL we can retrieve the request headers</h1> <
Please write code for this program in java and Explain it ? pl'sssssssss
. it's very easy just read the question atleast 5 times u can solve it. ok Best Of Luck...Please write code for this program in java and Explain it ? pl'sssssssss ... array of 2n integers. Write one of the following methods: C/C++: int
JSP implicit object "request"
it to the server. This is performed using an HTTP request such as: headers, cookies... is expecting. There are many more request headers available. These headers you can see... the methods GET, POST, or PUT corresponding to the requested HTTP method used
Plz Plz reply Me - JSP-Servlet
Plz Plz reply Me  Respected Sir/madam, I am R.Ragavendran.. Actually... the image.. I request you to remember the code which you have provided for me..., Read for more information. http://www.roseindia.net/jsp/pop-window.shtml
Spring Handling Form Request
Spring Handling form Request By help of this tutorial we are going explain..._ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi
Request Headers in JSP
;    Whenever an http client sends a request, it sends... more request headers availables. These headers you can see in the output... in the request object. We can retrieve these by using the Enumeration interface
HTTP Status 500 -
HTTP Status 500 -   I've installed my Java libraries, and I am... encountered an internal error () that prevented it from fulfilling this request... is available in the Apache Tomcat/5.0.28 logs. Apache Tomcat/5.0.28 plz solution
can any one explain this
can any one explain this  class Clidder { private final void flipper() { System.out.println("Clidder"); } } public class Ex3 extends Clidder { public final void flipper() { System.out.println
can you explain ?
can you explain ?  my dear can you teel me the explaintion...(" "); } } System.out.println(); } } iam explain whole code exept this part can you help
HTTP Status 500 -
wrote. i can see these errors... HTTP Status 500 - type Exception report...HTTP Status 500 -   Hi, I am new to jsp... Installed Tomcat 5.5.... it from fulfilling this request. exception org.apache.jasper.JasperException
program on helloworld :explain
}   Class is the building block in Java, each and every methods &... of the class or function can be public, private, etc. The class Hello code declares...: The keyword static indicates that the method is a class method, which can
program on helloworld :explain
is the building block in Java, each and every methods & variable exists within... specifies the accessibility of the class. The visibility of the class or function can... is a class method, which can be called without the requirement to instantiate
Session Object from request
request object? Why are we adding cookie object into response object? Why are we getting cookie object from request object? I know all methods are available its relevant class. is there any reason for getting session object from request
JSP Request Object
an HTTP request. The request object is used to take the value from the client?s web browser and pass it to the server. This is performed using an HTTP request...: Javax.servlet.http.httpservletrequest. Methods of request Object: getCookies
plz send code for this
plz send code for this  Program to calculate the sum of two big numbers (the numbers can contain more than 1000 digits). Don't use any library classes or methods (BigInteger etc
how can u reduce the size of textfield?
how can u reduce the size of textfield?  how can u reduce the size of textfield? thanks in advance   import javax.swing.*; public class ReduceTextField extends JFrame { public static void main(String
Declare Methods is _jspService() only - JSP-Interview Questions
Declare Methods is _jspService() only   Hi Friends, My interviewer said, any methods if u want to use ,should declare in d _jspService method.But i said we can declare inside scriplets.which is correct plz tell me
required treenodes checkboxes are not clicking if u change the url - Java Server Faces Questions
required treenodes checkboxes are not clicking if u change the url  Hi, Here i have Library.java file. just look at d url : http://localhost...(1001,1007,1002,1005,1008,1002,1009,1010,1008)are getting clicked. But when u again add or remove the album
plz. answer my ques - Java Beginners
plz. answer my ques  I want to ask a prog. prob which would create... such type of program is possible in c.  can you mention technology in which u want to do i mean for view or it simple console based.  create
Check if parameter exists in servlet request
;> You can select parameters here to send request to servlet... Check if parameter exists in servlet request... will see how to check is parameter exists in servlet request. In this example
Gui plz help
Gui plz help   Create a Java application that would allow a person... if u got it right or wrong and also i gave them some coding but i can't make it do only 10 questions for button1 and not able to add them so i can get answers
plz help - Java Beginners
plz help  i have to programs and it takes too long to run them so i... some operations ... how can i makes them as thread first code: import......."); } } For more information on Thread in Java visit to : http
stateless session bean with methods error - Java Beginners
{ /** * Processes requests for both HTTP GET and POST methods. * @param request servlet... the HTTP GET method. * @param request servlet request * @param response...()); } } /** * Handles the HTTP POST method. * @param request servlet request
CAN U HELP ME TO CODE IN JSP FOR ONLINE VOTING SYSTEM
CAN U HELP ME TO CODE IN JSP FOR ONLINE VOTING SYSTEM  can u help me to code in jsp for online voting system

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.