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.

SERVLET / NOTES</>↗
Servlet19 Apr 2025

How do I use annotations to define Jakarta Servlet?

In Jakarta EE, you can define servlets using annotations instead of the traditional web.xml deployment descriptor. The most common annotation used for this purpose is @WebServlet. Here’s an overview of how to use annotations to define servlets: 1. Basic Syntax of the @WebServlet Annotation The @WebServlet annotation is used to declare a servlet and map […]

Wayan · 4 min read
SERVLET / NOTES</>↗
Servlet19 Apr 2025

How do I configure servlets in web.xml?

In a Jakarta EE (formerly Java EE) application, you can configure servlets in the web.xml deployment descriptor. The web.xml file is located in the WEB-INF directory of your project. Here’s how you can configure a servlet in web.xml step-by-step: 1. Declare the Servlet You define the servlet by giving it a name and specifying its […]

Wayan · 3 min read
SERVLET / NOTES</>↗
Servlet18 Apr 2025

How do I handle cookies using Jakarta Servlet API?

Handling cookies in the Jakarta Servlet API is simple and straightforward. Cookies are small bits of data sent from a server to a client and then sent back by the client in subsequent requests to the server. Below is how you can handle cookies using Jakarta Servlet API: 1. Creating and Adding a Cookie To […]

Wayan · 4 min read
SERVLET / NOTES</>↗
Servlet18 Apr 2025

How do I set response headers with HttpServletResponse?

To set response headers using HttpServletResponse in a Java web application (e.g., within a servlet), you can use the setHeader or addHeader methods provided by the HttpServletResponse class. Here’s an overview of both methods and how to use them: Methods for Setting Headers setHeader(String name, String value) This method sets a response header with a […]

Wayan · 3 min read
SOUND API / NOTES</>↗
Sound API18 Apr 2025

How do I apply gain and balance using FloatControl?

In Java, the FloatControl class is commonly used in conjunction with the javax.sound.sampled package to control certain sound properties, such as gain (volume) and balance, on lines (e.g., clips, data lines, or mixers). Here’s a quick explanation on how to apply gain and balance using FloatControl: Gain (Volume): The gain is used to adjust the […]

Wayan · 3 min read
SOUND API / NOTES</>↗
Sound API18 Apr 2025

How do I save the microphone audio as a proper WAF file?

To save the microphone audio as a proper WAV file, you need to use the AudioSystem.write() method. WAV files contain raw PCM data combined with a header that describes important details, such as the sample rate, number of channels, etc. Java’s javax.sound.sampled package makes it easy to save the audio in this format. Example: Saving […]

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