If you are not sure if the website you would like to visit is secure, you can verify it here. Enter the website address of the page and see parts of its content and the thumbnail images on this site. None (if any) dangerous scripts on the referenced page will be executed. Additionally, if the selected site contains subpages, you can verify it (review) in batches containing 5 pages.
favicon.ico: dineshonjava.com/httpresponse-servlet - HttpResponse Servlet - Dinesh .

site address: dineshonjava.com/httpresponse-servlet redirected to: dineshonjava.com/httpresponse-servlet

site title: HttpResponse Servlet - Dinesh on Java

Our opinion (on Thursday 19 November 2026 13:06:14 UTC):

GREEN status (no comments) - no comments
After content analysis of this website we propose the following hashtags:



Meta tags:
author=;

Headings (most frequently used words):

servlet, to, http, response, example, servlets, content, writing, the, httpresponse, methods, set, header, upload, file, java, lang, classnotfoundexception, javax, jsp, jstl, core, config, hello, world, in, interface, life, cycle, environment, setup, hits, counter, headers, type, text, length, binary, data, redirecting, different, url, create, share, this, related, posts, about, author, dinesh, rajput,

Text of the page (most frequently used words):
the (128), response (58), spring (53), and (33), servlet (29), you (26), tutorial (25), #content (24), header (23), java (21), void (21), string (21), interview (20), type (17), name (16), text (16), web (14), back (14), html (13), for (13), object (13), value (12), with (11), http (11), browser (11), boot (10), can (10), url (10), are (10), set (10), sets (10), core (9), has (9), example (9), out (9), data (9), httpresponse (9), microservices (8), design (8), write (8), this (8), request (8), println (8), code (8), client (8), dinesh (7), share (7), methods (7), setheader (7), body (7), your (7), here (7), writer (7), length (7), int (7), security (6), aop (6), jax (6), hibernate (6), opens (6), new (6), window (6), myname (6), printwriter (6), from (6), how (6), writing (6), plain (6), headers (6), specified (6), given (6), mvc (5), rest (5), application (5), use (5), been (5), different (5), servlets (5), javax (5), using (5), getwriter (5), just (5), send (5), method (5), binary (5), mime (5), sending (5), buffer (5), status (5), cloud (4), soap (4), patterns (4), search (4), batch (4), related (4), first (4), file (4), httpservlet (4), import (4), httpservletresponse (4), keys (4), key (4), redirect (4), any (4), outputstream (4), will (4), instance (4), like (4), not (4), returns (4), boolean (4), adds (4), date (4), sends (4), jdbc (3), jstl (3), jsp (3), struts (3), services (3), tutorials (3), hateoas (3), development (3), architecture (3), technologies (3), previous (3), about (3), doget (3), setcontenttype (3), cache (3), basic (3), sendredirect (3), redirecting (3), instead (3), have (3), obtained (3), types (3), image (3), that (3), written (3), encoding (3), committed (3), cookie (3), privacy (2), policy (2), who (2), training (2), service (2), linux (2), git (2), thymeleaf (2), mongo (2), ant (2), gradle (2), maven (2), build (2), tools (2), ajax (2), hadoop (2), mail (2), api (2), j2ee (2), computing (2), wsdl (2), questions (2), mobile (2), certification (2), monitoring (2), testing (2), react (2), learn (2), solve (2), common (2), problems (2), rajput (2), dineshonjava (2), technical (2), author (2), pattern (2), his (2), latest (2), framework (2), company (2), developer (2), very (2), when (2), list (2), life (2), cycle (2), hello (2), posts (2), pinterest (2), telegram (2), whatsapp (2), linkedin (2), facebook (2), next (2), servletcontext (2), servletconfig (2), genericservlet (2), what (2), difference (2), between (2), class (2), public (2), httpservletrequest (2), throws (2), servletexception (2), ioexception (2), setdateheader (2), head (2), title (2), cannot (2), getoutputstream (2), find (2), png (2), also (2), tells (2), httprequest (2), cover (2), used (2), encodes (2), needed (2), unchanged (2), indicating (2), integer (2), clears (2), clearing (2), error (2), location (2), size (2), charset (2), being (2), sent (2), yet (2), locale (2), long (2), senderror (2), following (2), these (2), return (2), three (2), lines (2), copyright, 2026, hands, performance, engineer, guide, continuous, let, full, stack, designing, applications, native, various, them, best, practices, chief, editor, website, blog, dedicated, series, articles, enthusiast, since, 2008, pivotal, certified, professional, book, blogger, more, than, years, experience, aspects, expertise, lies, version, creating, apis, microservice, reactive, cassandra, mongodb, currently, working, technology, manager, leading, product, worked, tech, lead, bennett, coleman, ltd, was, paytm, passionate, loves, blogs, active, member, community, forums, comes, tops, hits, counter, environment, setup, world, interface, lang, classnotfoundexception, config, upload, uploading, database, access, sevlet, filter, requestdispatcher, advantages, over, cgi, overview, index, processing, take, two, parameters, util, servletsample, extends, enumeration, getparameternames, while, hasmoreelements, nextelement, equalsignorecase, getparameter, system, pragma, expires, control, flush, after, add, create, https, com, order, afterall, intended, favourite, engine, again, matching, pdf, flash, something, 31642, many, bytes, need, then, similarly, see, pair, contain, must, before, get, post, obtain, lot, most, commonly, read, javadoc, interested, parts, including, session, whether, named, already, forces, exists, well, underlying, without, temporary, preferred, character, utf, setstatus, setlocale, loc, setintheader, setcontentlength, len, setcharacterencoding, setbuffersize, msg, resetbuffer, reset, flushbuffer, addintheader, addheader, adddateheader, addcookie, iscommitted, containsheader, encodeurl, encoderedirecturl, there, which, program, available, purpose, represent, look, webservice, popular, protected, signature, print, line, identifies, often, placed, prevent, browsers, proxy, servers, caching, dynamically, generated, pages, want, dynamic, page, cached, remove, generates, requesting, its, allow, comments, december, 2013, home,


Text of the page (random words):
httpresponse servlet dinesh on java core java core java java 8 certification interview q a spring boot spring spring core spring aop spring mvc spring security microservices spring 4 spring 5 spring batch spring mobile spring hateoas hibernate hibernate search tutorials design patterns web services ws interview questions jax ws soap jax rs rest wsdl soap cloud computing struts 2 tutorial j2ee tutorial servlet tutorial jsp tutorial jstl tutorial jdbc tutorial jax b tutorial java mail api hadoop tutorial ajax tutorial build tools maven gradle ant mongo db thymeleaf git linux interview q a spring interview aop interview mvc interview spring boot interview microservices interview spring security interview web service interview training who i am privacy policy home servlet httpresponse servlet december 14 2013 no comments httpresponse servlet the httpservlet class request processing methods take two parameters javax servlet http httprequest javax servlet http httpresponse the httpservletresponse object generates a response to return to the requesting client its methods allow you to set the response header and the response body the first line of the response header response setcontenttype text html identifies the mime type of the response the following three lines are often placed in servlet code to prevent web browsers and proxy servers from caching dynamically generated web pages if you want your dynamic web page to be cached remove these three lines of code the response object also has the getwriter method to return a printwriter object the print and println methods of the printwriter object write the servlet response back to the client for instance here is the signature of the httpservlet doget method protected void doget httpservletrequest request httpservletresponse response throws servletexception ioexception popular tutorials spring tutorial spring mvc web tutorial spring boot tutorial spring security tutorial spring aop tutorial spring jdbc tutorial spring hateoas microservices with spring boot rest webservice core java hibernate tutorial spring batch in this text i will look at the httpresponse object the purpose of the httpresponse object is to represent the http response your web application sends back to the browser in response to the http request the browser send to your web application methods to set http response header there are following methods which can be used to set http response header in your servlet program these methods are available with httpservletresponse object 1 string encoderedirecturl string url encodes the specified url for use in the sendredirect method or if encoding is not needed returns the url unchanged 2 string encodeurl string url encodes the specified url by including the session id in it or if encoding is not needed returns the url unchanged 3 boolean containsheader string name returns a boolean indicating whether the named response header has already been set 4 boolean iscommitted returns a boolean indicating if the response has been committed 5 void addcookie cookie cookie adds the specified cookie to the response 6 void adddateheader string name long date adds a response header with the given name and date value 7 void addheader string name string value adds a response header with the given name and value 8 void addintheader string name int value adds a response header with the given name and integer value 9 void flushbuffer forces any content in the buffer to be written to the client 10 void reset clears any data that exists in the buffer as well as the status code and headers 11 void resetbuffer clears the content of the underlying buffer in the response without clearing headers or status code 12 void senderror int sc sends an error response to the client using the specified status code and clearing the buffer 13 void senderror int sc string msg sends an error response to the client using the specified status 14 void sendredirect string location sends a temporary redirect response to the client using the specified redirect location url 15 void setbuffersize int size sets the preferred buffer size for the body of the response 16 void setcharacterencoding string charset sets the character encoding mime charset of the response being sent to the client for example to utf 8 17 void setcontentlength int len sets the length of the content body in the response in http servlets this method sets the http content length header 18 void setcontenttype string type sets the content type of the response being sent to the client if the response has not been committed yet 19 void setdateheader string name long date sets a response header with the given name and date value 20 void setheader string name string value sets a response header with the given name and value 21 void setintheader string name int value sets a response header with the given name and integer value 22 void setlocale locale loc sets the locale of the response if the response has not been committed yet 23 void setstatus int sc sets the status code for this response the httpresponse object has a lot of methods so i will just cover the most commonly used here the rest you can read about in the javadoc if you are interested the parts i will cover are writing html headers content type writing text content length writing binary data redirecting to a different url writing html to send html back to the browser you have to obtain the a printwriter from the httpresponse object here is how printwriter writer response getwriter writer write html body get post response body html headers just like the request object the httprequest can contain http headers headers must be set before any data is written to the response you set a header on the response object like this response setheader header name header value as you can see a response header is a name value pair content type the content type header is a response header that tells the browser the type of the content you are sending back to it for instance the content type for html is text html similarly if what you send back to the browser is plain text you use the content type text plain here is how you set the content type header on the httpresponse object response setheader content type text html writing text you can write text back to the browser instead of html like this response setheader content type text plain printwriter writer response getwriter writer write this is just plain text first the content type header is set to text plain then a plain text string is written to the writer obtained from the response object content length the content length header tells the browser how many bytes your servlet is sending back if you are sending binary data back you need to set the content length header here is how response setheader content length 31642 writing binary data you can also write binary data back to the browser instead of text for instance you can send an image back a pdf file or a flash file or something like that again you will first have to set the content type header to the type matching the data you are sending back for instance the content type for a png image is image png you can search for mime types in your favourite search engine to find a list of mime types content types so you can find the mime type for the content you are sending back in order to write binary data back to the browser you cannot use the writer obtained from response getwriter afterall writer s are intended for text instead you have to use the outputstream obtained from the response getoutputstream method here is how outputstream outputstream response getoutputstream outputstream write redirecting to a different url you can redirect the browser to a different url from your servlet you cannot send any data back to the browser when redirecting here is how you redirect response sendredirect https dineshonjava com create the http response after the servlet request code add the response code import java io import java util import javax servlet import javax servlet http public class servletsample extends httpservlet public void doget httpservletrequest request httpservletresponse response throws servletexception ioexception enumeration keys string key string myname keys request getparameternames while keys hasmoreelements key string keys nextelement if key equalsignorecase myname myname request getparameter key system out println name if myname myname hello response setcontenttype text html response setheader pragma no cache response setdateheader expires 0 response setheader cache control no cache printwriter out response getwriter out println html out println head title just a basic servlet title head out println body out println h1 just a basic servlet h1 out println p myname this is a very basic servlet out println body html out flush previous index next servlet related posts java servlets overview servlet life cycle servlet example difference between servletconfig and servletcontext difference between genericservlet and httpservlet what is web application advantages of servlets over cgi genericservlet example requestdispatcher example servletconfig servletcontext servlet filter example database access example using sevlet file uploading example using servlet previous next share this share on facebook opens in new window facebook share on x opens in new window x share on linkedin opens in new window linkedin share on whatsapp opens in new window whatsapp share on telegram opens in new window telegram share on pinterest opens in new window pinterest servlet related posts servlet upload file example java lang classnotfoundexception javax servlet jsp jstl core config hello world example in servlet interface servlet life cycle servlets environment setup servlets hits counter about the author dinesh rajput dinesh rajput is the chief editor of a website dineshonjava a technical blog dedicated to the spring and java technologies it has a series of articles related to java technologies dinesh has been a spring enthusiast since 2008 and is a pivotal certified spring professional an author of a book spring 5 design pattern and a blogger he has more than 10 years of experience with different aspects of spring and java design and development his core expertise lies in the latest version of spring framework spring boot spring security creating rest apis microservice architecture reactive pattern spring aop design patterns struts hibernate web services spring batch cassandra mongodb and web application design and architecture he is currently working as a technology manager at a leading product and web development company he worked as a developer and tech lead at the bennett coleman co ltd and was the first developer in his previous company paytm dinesh is passionate about the latest java technologies and loves to write technical blogs related to it he is a very active member of the java and spring community on different forums when it comes to the spring framework and java dinesh tops the list learn various design patterns and best practices and use them to solve common design problems learn spring boot 2 0 and spring cloud application microservices architecture to solve common cloud native problems designing applications with spring boot 2 2 and react js let us full stack development with spring boot and react js hands on microservices monitoring and testing a performance engineer s guide to the continuous testing and monitoring of microservices dinesh on java copyright 2026 core java core java java 8 certification interview q a spring boot spring spring core spring aop spring mvc spring security microservices spring 4 spring 5 spring batch spring mobile spring hateoas hibernate hibernate search tutorials design patterns web services ws interview questions jax ws soap jax rs rest wsdl soap cloud computing struts 2 tutorial j2ee tutorial servlet tutorial jsp tutorial jstl tutorial jdbc tutorial jax b tutorial java mail api hadoop tutorial ajax tutorial build tools maven gradle ant mongo db thymeleaf git linux interview q a spring interview aop interview mvc interview spring boot interview microservices interview spring security interview web service interview training who i am privacy policy
Thumbnail images (randomly selected): * Images may be subject to copyright.GREEN status (no comments)
  • Spring-5-Design-Pattern
  • Designing Applications wi...

Verified site has: 75 subpage(s). Do you want to verify them? Verify pages:

1-5 6-10 11-15 16-20 21-25 26-30 31-35 36-40 41-45 46-50
51-55 56-60 61-65 66-70 71-75


The site also has 2 references to external domain(s).

 dineshrajput.com  Verify  amazon.in  Verify


Top 50 hastags from of all verified websites.

Supplementary Information (add-on for SEO geeks)*- See more on header.verify-www.com

Header

HTTP/1.1 301 Moved Permanently
Date Thu, 19 Nov 2026 13:06:13 GMT
Content-Type text/html
Content-Length 795
Connection close
location htt????/dineshonjava.com/httpresponse-servlet
platform hostinger
panel hpanel
content-security-policy upgrade-insecure-requests
Server hcdn
alt-svc h3= :443 ; ma=86400
x-hcdn-request-id cedd093aab4f89ad4e21eeec60908534-int-edge7
x-hcdn-cache-status MISS
x-hcdn-upstream-rt 0.141
HTTP/2 301
date Thu, 19 Nov 2026 13:06:14 GMT
content-type text/html; charset=UTF-8
content-length 0
location htt????/dineshonjava.com/httpresponse-servlet/
x-powered-by PHP/8.3.36
expires Thu, 19 Nov 2026 14:06:14 GMT
cache-control max-age=3600
x-redirect-by WordPress
x-litespeed-cache miss
platform hostinger
panel hpanel
content-security-policy upgrade-insecure-requests
x-endurance-cache-level 2
x-nginx-cache WordPress
server hcdn
alt-svc h3= :443 ; ma=86400
x-hcdn-request-id 0548b1f00c76ca4b159a8067f5eb01fc-int-edge10
x-hcdn-cache-status MISS
x-hcdn-upstream-rt 0.810
HTTP/2 200
date Thu, 19 Nov 2026 13:06:14 GMT
content-type text/html; charset=UTF-8
vary Accept-Encoding
x-powered-by PHP/8.3.36
link <htt????/dineshonjava.com/wp-json/>; rel= htt????/api.w.org/
link <htt????/dineshonjava.com/wp-json/wp/v2/posts/265>; rel= alternate ; title= JSON ; type= application/json
link <htt????/wp.me/p94H1c-4h>; rel=shortlink
etag 119-1795091454;gz
x-litespeed-cache hit
content-encoding gzip
platform hostinger
panel hpanel
content-security-policy upgrade-insecure-requests
x-endurance-cache-level 2
x-nginx-cache WordPress
server hcdn
alt-svc h3= :443 ; ma=86400
x-hcdn-request-id 196fff0a3d885df3372a84a3e87acc20-int-edge10
x-hcdn-cache-status MISS
x-hcdn-upstream-rt 0.143

Meta Tags

title="HttpResponse Servlet - Dinesh on Java"
charset="UTF-8"
name="msapplication-TileImage" content="htt????/i0.wp.com/dineshonjava.com/wp-content/uploads/2017/08/favicon.png?fit=177%2C106&ssl=1"
name="viewport" content="width=device-width, initial-scale=1"
name="apple-mobile-web-app-capable" content="yes"
name="apple-mobile-web-app-status-bar-style" content="black"
itemprop="name" content="Dinesh on Java"
itemprop="url" content="htt????/dineshonjava.com"
itemprop="creator accountablePerson" content="Dinesh Rajput"
name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"
property="og:locale" content="en_US"
property="og:type" content="article"
property="og:title" content="HttpResponse Servlet - Dinesh on Java"
property="og:description" content="The HttpServlet class request processing methods take two parameters. javax.servlet.http.HttpRequest javax.servlet.http.HttpResponse The HttpServletResponse object generates a response to return to the requesting client. Its methods allow you to set the response header and the response body. The first line of the Response header (response.setContentType(“text/html”);) identifies the MIME type of the response. The following three lines are often placed in servlet code to prevent Web browsers and proxy servers from caching dynamically-generated Web pages. If you want your dynamic Web page to be cached, remove these three lines of code. The response object also has the getWriter() method to return a"
property="og:url" content="htt????/dineshonjava.com/httpresponse-servlet/"
property="og:site_name" content="Dinesh on Java"
property="article:publisher" content="htt????/www.facebook.com/thedineshonjava/"
property="article:author" content="htt????/www.facebook.com/thedineshonjava/"
property="article:published_time" content="2013-12-14T09:52:00+00:00"
property="article:modified_time" content="2018-01-10T03:41:54+00:00"
name="author" content="Dinesh Rajput"
name="twitter:card" content="summary_large_image"
name="twitter:creator" content="@dineshonjava"
name="twitter:site" content="@dineshonjava"
name="twitter:label1" content="Written by"
name="twitter:data1" content="Dinesh Rajput"
name="twitter:label2" content="Est. reading time"
name="twitter:data2" content="7 minutes"
name="generator" content="AMP for WP 1.1.20"
name="generator" content="WordPress 7.1.4"
name="msapplication-TileImage" content="htt????/i0.wp.com/dineshonjava.com/wp-content/uploads/2017/08/favicon.png?fit=177%2C106&ssl=1"

Load Info

page size24065
load time (s)1.150738
redirect count2
speed download20926
server IP 147.79.116.27
* all occurrences of the string "http://" have been changed to "htt???/"