Tag

HttpServletResponse

0 views collected around this technical thread.

IT Xianyu
IT Xianyu
Oct 27, 2020 · Backend Development

Using HttpServletResponse: Methods, Examples, and Best Practices

This article explains the HttpServletResponse object's role in Java web development, details common response header methods, highlights differences between addXXX and setXXX, and provides four complete servlet code examples covering cache control, page refresh, file download (including Chinese filenames), and dynamic image generation.

BackendHttpServletResponseJava
0 likes · 9 min read
Using HttpServletResponse: Methods, Examples, and Best Practices
Java Captain
Java Captain
May 24, 2018 · Backend Development

HttpServletResponse Usage: Sending Data, Managing Encoding, and Implementing File Downloads in Java Servlets

This article explains how HttpServletResponse represents server responses in Java web applications, covering methods for sending data, headers, and status codes, demonstrates outputting Chinese characters via OutputStream and PrintWriter, shows numeric output handling, and provides detailed examples of file download implementations with proper encoding considerations.

FileDownloadHttpServletResponseJava
0 likes · 19 min read
HttpServletResponse Usage: Sending Data, Managing Encoding, and Implementing File Downloads in Java Servlets