SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

JSCH / NOTES</>↗
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 min read
SERVLET / NOTES</>↗
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 min read
SERVLET / NOTES</>↗
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 min read
JSCH / NOTES</>↗
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 min read
SERVLET / NOTES</>↗
Servlet23 Apr 2025

How do I secure servlets with declarative security in web.xml

Securing servlets with declarative security in the web.xml deployment descriptor is an essential practice in Java web applications. It allows you to define security constraints without writing specific code, instead leveraging the standard configuration mechanism in web.xml. Here’s how you can do it step-by-step: 1. Define a Security Constraint The <security-constraint> element is used to […]

Wayan · 6 min read
SERVLET / NOTES</>↗
Servlet23 Apr 2025

How do I handle file uploads using Jakarta Servlet 6.0+?

In Jakarta Servlet 6.0+, file uploads can be handled efficiently using the native APIs provided by the servlet specifications. Here’s a step-by-step guide: 1. Enable Multipart Config for the Servlet To handle file uploads, the servlet must be annotated with @MultipartConfig, which enables support for handling multipart/form-data requests. You can configure parameters such as maximum […]

Wayan · 4 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

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

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.