- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 34484 Articles for Programming
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
120 Views
When a Web server responds to an HTTP request, the response typically consists of a status line, some response headers, a blank line, and the document. A typical response looks like this −HTTP/1.1 200 OK Content-Type: text/html Header2: ... ... HeaderN: ... (Blank Line) ... ... The status line consists of the HTTP version (HTTP/1.1 in the example), a status code (200 in the example), and a very short message corresponding to the status code (OK in the example).Following is ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
308 Views
The request object provides methods to get HTTP header information including form data, cookies, HTTP methods, etc.Following table lists out the important methods that can be used to read HTTP header in your JSP program. These methods are available with HttpServletRequest object which represents client request to webserver.Sr.No.Method & Description1Cookie[] getCookies()Returns an array containing all of the Cookie objects the client sent with this request.2Enumeration getAttributeNames()Returns an Enumeration containing the names of the attributes available to this request.3Enumeration getHeaderNames()Returns an enumeration of all the header names this request contains.4Enumeration getParameterNames()Returns an enumeration of String objects containing the names of the ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
384 Views
Following is the example which uses getHeaderNames() method of HttpServletRequest to read the HTTP header information. This method returns an Enumeration that contains the header information associated with the current HTTP request.Once we have an Enumeration, we can loop down the Enumeration in the standard manner. We will use the hasMoreElements() method to determine when to stop and the nextElement() method to get the name of each parameter name. HTTP Header Request Example HTTP Header Request Example Header Name Header Value(s)
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
883 Views
The request object is an instance of a javax.servlet.http.HttpServletRequest object. Each time a client requests a page, the JSP engine creates a new object to represent that request.The request object provides methods to get HTTP header information including form data, cookies, HTTP methods, etc.Following is the example which uses getHeaderNames() method of HttpServletRequest to read the HTTP header information. This method returns an Enumeration that contains the header information associated with the current HTTP request.Once we have an Enumeration, we can loop down the Enumeration in the standard manner. We will use the hasMoreElements() method to determine when to stop ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
119 Views
Following table lists out the nine Implicit Objects that JSP supports −Sr.No.Object & Description1requestThis is the HttpServletRequest object associated with the request.2responseThis is the HttpServletResponse object associated with the response to the client.3outThis is the PrintWriter object used to send output to the client.4sessionThis is the HttpSession object associated with the request.5applicationThis is the ServletContext object associated with the application context.6configThis is the ServletConfig object associated with the page.7pageContextThis encapsulates use of server-specific features like higher performance JspWriters.8pageThis is simply a synonym for this, and is used to call the methods defined by the translated servlet class.9ExceptionThe Exception object allows ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
98 Views
The action can be used to write the template text in JSP pages and documents. Following is the simple syntax for this action −Template dataThe body of the template cannot contain other elements; it can only contain text and EL expressions (Note − EL expressions are explained in a subsequent chapter). Note that in XML files, you cannot use expressions such as ${whatever > 0}, because the greater than signs are illegal. Instead, use the gt form, such as ${whatever gt 0} or an alternative is to embed the value in a CDATA section.]]>If you need to include a ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
146 Views
The plugin action is used to insert Java components into a JSP page. It determines the type of browser and inserts the or tags as needed.If the needed plugin is not present, it downloads the plugin and then executes the Java component. The Java component can be either an Applet or a JavaBean.The plugin action has several attributes that correspond to common HTML tags used to format Java components. The element can also be used to send parameters to the Applet or Bean.Following is the typical syntax of using the plugin action − ... Read More