Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

SERVLET / CATATAN</>
Servlet17 Apr 2025

How do I include content from another servlet or JSP?

To include the content of one servlet or JSP into another, you can use the functionality provided by the RequestDispatcher interface in Jakarta Servlet (previously Javax Servlet). The two primary methods for including content are: Using RequestDispatcher.include(): This method includes the response of another servlet or JSP within the response of the current servlet or […]

Wayan · 3 menit baca
SERVLET / CATATAN</>
Servlet17 Apr 2025

How do I forward requests with RequestDispatcher?

In Java, the RequestDispatcher is used to forward a client’s request to another resource, such as a servlet, JSP, or HTML file. This is common when you want to break down the processing of a request into multiple components. Syntax to Use RequestDispatcher The RequestDispatcher interface provides two main methods to forward or include content: […]

Wayan · 3 menit baca
HTTPCLIENT / CATATAN</>
HttpClient16 Apr 2025

How do I set a timeout on HTTP requests in Java 11?

To set a timeout on HTTP requests in Java 11, you can use the HttpClient provided by the java.net.http module. The HttpClient API allows you to configure timeouts for requests in a convenient and standardized way. Here’s how you can do it: Set a Connection Timeout: This controls the timeout when establishing a connection to […]

Wayan · 2 menit baca
HTTPCLIENT / CATATAN</>
HttpClient16 Apr 2025

How do I set custom headers in Java 11 HttpRequest?

In Java 11, the java.net.http package introduced the new HttpClient API, which simplifies working with HTTP requests and responses. To set custom headers for an HttpRequest, you can use the headers method or the setHeader method while building your request using the HttpRequest.Builder. Here’s a step-by-step guide for setting custom headers: Example Code package org.kodejava.net.http; […]

Wayan · 2 menit baca
HTTPCLIENT / CATATAN</>
HttpClient15 Apr 2025

How do I handle HTTP response status codes with Java 11 HttpClient?

Handling HTTP response status codes with Java 11’s HttpClient API involves making a request, receiving a response, and then checking the status code returned in the response. Here’s how you can do this: Steps to Handle HTTP Response Status Codes Create the HttpClient: Build an instance of HttpClient. Build the Request: Define the HTTP request […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency15 Apr 2025

How do I use Callable and Future to return results from threads?

In Java, the Callable interface and Future interface are used in conjunction to run tasks asynchronously in a separate thread and fetch the result of the computation once it is complete. This is particularly useful when you need the task to return a result or throw a checked exception. Here’s a step-by-step guide to how […]

Wayan · 4 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.