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</>
Servlet25 Apr 2025

How do I use listeners like ServletContextListener for lifecycle management?

In Jakarta EE (formerly Java EE), you can use listeners like ServletContextListener to manage the lifecycle of a web application’s ServletContext. It provides hooks to execute logic during the initialization and destruction stages of the application. This can be useful for resource initialization, cleanup, or logging purposes. Here’s how you can use ServletContextListener: 1. Implementing […]

Wayan · 4 menit baca
SERVLET / CATATAN</>
Servlet25 Apr 2025

How do I handle exceptions and errors in Jakarta Servlets?

Handling exceptions and errors in Jakarta Servlets involves several approaches, ranging from defining error-handling configurations in the deployment descriptor (web.xml) to using annotations and specific coding practices. Below are the typical ways to handle errors and exceptions in Jakarta Servlets: 1. Using web.xml for Declarative Exception Handling In the web.xml file, you can define error […]

Wayan · 6 menit baca
JSCH / CATATAN</>
JSch24 Apr 2025

How do I list directory contents on a remote server using JSch?

To list the contents of a directory on a remote server using JSch (a Java library for SSH), you need to establish an SSH connection and use the SFTP protocol to query the directory. Here’s how you can do it programmatically: Steps to List Directory Contents: Establish a session: Connect to the remote server with […]

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

How do I use AsyncContext for asynchronous processing in servlets?

Using AsyncContext in servlets allows you to perform asynchronous request processing. This can improve scalability in situations where a request might involve long-running operations, such as external API calls or database queries, by freeing up server threads while those tasks are performed. Here’s how you can use AsyncContext for asynchronous processing in a servlet: 1. […]

Wayan · 4 menit baca
SERVLET / CATATAN</>
Servlet24 Apr 2025

How do I log from a servlet using ServletContext.log()?

In Java servlets, you can use the ServletContext.log() method to log messages, exceptions, or context-specific information. The ServletContext object is available in your servlet and allows you to log messages to the server’s log file. Here are the common ways you can log using ServletContext.log(): 1. Logging a simple message: You can log plain text […]

Wayan · 3 menit baca
JSCH / CATATAN</>
JSch24 Apr 2025

How do I authenticate with a username and password using JSch?

To authenticate using a username and password with the JSch library (used for SSH connections in Java), you can follow these steps: Add JSch Dependency Make sure your project includes the JSch library. You can add it using Maven or Gradle if you’re using a build system. For Maven: <dependency> <groupId>com.jcraft</groupId> <artifactId>jsch</artifactId> <version>0.1.55</version> </dependency> For […]

Wayan · 3 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.