# Web Development

**URL:** https://discuss.kotlinlang.org/c/web-development/12.md

[Latest](https://discuss.kotlinlang.org/latest.md) · [Categories](https://discuss.kotlinlang.org/categories.md)

---

## [About the Web Development category](https://discuss.kotlinlang.org/t/about-the-web-development-category/1339)

<div class="topic-metadata">

**Author:** [@Roman\_Belov](https://discuss.kotlinlang.org/u/Roman_Belov)\
**Replies:** 0\
**Last updated:** [December 4, 2015, 7:57am UTC](https://discuss.kotlinlang.org/t/about-the-web-development-category/1339 "2015-12-04T07:57:59Z")

</div>

Developing web applications in Kotlin (client and server). See also related channels in Kotlin Slack (you can sign up here): #server #javascript #ktor

---

## [How to preserve Context for whole Request with Spring webFlux and coroutines](https://discuss.kotlinlang.org/t/how-to-preserve-context-for-whole-request-with-spring-webflux-and-coroutines/30614)

<div class="topic-metadata">

**Author:** [@dineshmatrix675](https://discuss.kotlinlang.org/u/dineshmatrix675)\
**Replies:** 22\
**Last updated:** [July 30, 2025, 10:09am UTC](https://discuss.kotlinlang.org/t/how-to-preserve-context-for-whole-request-with-spring-webflux-and-coroutines/30614 "2025-07-30T10:09:56Z")

</div>

Context: Currently in my web application each request handled by each thread so to store logging context in whole application i use threadLocal which is initialised at start of request and flush logging data & reset at …

---

## [Slf4j's MDC and Coroutines](https://discuss.kotlinlang.org/t/slf4js-mdc-and-coroutines/18903)

<div class="topic-metadata">

**Author:** [@uykusuz](https://discuss.kotlinlang.org/u/uykusuz)\
**Replies:** 4\
**Last updated:** [July 24, 2025, 7:34pm UTC](https://discuss.kotlinlang.org/t/slf4js-mdc-and-coroutines/18903 "2025-07-24T19:34:09Z")

</div>

Hi guys, I hope I’m in the right place to ask my question. If that’s not the case, please tell me. My question in short is: is there a way to hook into the activation/execution of basically every coroutine and do some …

---

## [Spring, Coroutines, Virtual Threads](https://discuss.kotlinlang.org/t/spring-coroutines-virtual-threads/29949)

<div class="topic-metadata">

**Author:** [@pcleary](https://discuss.kotlinlang.org/u/pcleary)\
**Replies:** 20\
**Last updated:** [July 24, 2025, 9:03am UTC](https://discuss.kotlinlang.org/t/spring-coroutines-virtual-threads/29949 "2025-07-24T09:03:28Z")

</div>

I’m working on a legacy REST backend written in Kotlin using the Servlet Stack / tomcat / thread per request. In experimenting with going fully async non blocking, I’ve looked at Virtual Threads and Coroutines. Virtual…

---

## [Add Context to CoroutineContext from within Ktor plugin handler](https://discuss.kotlinlang.org/t/add-context-to-coroutinecontext-from-within-ktor-plugin-handler/28956)

<div class="topic-metadata">

**Author:** [@steyn.gareth](https://discuss.kotlinlang.org/u/steyn.gareth)\
**Replies:** 7\
**Last updated:** [January 20, 2025, 9:25am UTC](https://discuss.kotlinlang.org/t/add-context-to-coroutinecontext-from-within-ktor-plugin-handler/28956 "2025-01-20T09:25:34Z")

</div>

Hi all, I’m trying to create a SecurityContext (an object that contains info about the logged in user) and add it in the CoroutineContext by using a CoroutineContextElement. I need to do this by creating a RouteScopePl…

---

## [KTOR self-signed certificate causes bad\_certificate error](https://discuss.kotlinlang.org/t/ktor-self-signed-certificate-causes-bad-certificate-error/28910)

<div class="topic-metadata">

**Author:** [@Skater901](https://discuss.kotlinlang.org/u/Skater901)\
**Replies:** 4\
**Last updated:** [September 25, 2024, 7:11am UTC](https://discuss.kotlinlang.org/t/ktor-self-signed-certificate-causes-bad-certificate-error/28910 "2024-09-25T07:11:06Z")

</div>

I have a microservice written in KTOR. For local testing, I’m using the ktor-network-tls-certificates-jvm:2.3.10 library to generate a self-signed certificate. If I make HTTPS requests using Insomnia, it works perfectly.…

---

## [Microservice with Ktor and Kafka](https://discuss.kotlinlang.org/t/microservice-with-ktor-and-kafka/29203)

<div class="topic-metadata">

**Author:** [@frevib](https://discuss.kotlinlang.org/u/frevib)\
**Replies:** 33\
**Last updated:** [September 14, 2024, 5:24pm UTC](https://discuss.kotlinlang.org/t/microservice-with-ktor-and-kafka/29203 "2024-09-14T17:24:50Z")

</div>

Hi, what would be the best approach running Ktor together with Kafka? Or running any other long-running process like Kafka together with Ktor? I came up with these three ideas, but I’m not sure which would be “best”, in …

---

## [How log suspend function argument with AOP?](https://discuss.kotlinlang.org/t/how-log-suspend-function-argument-with-aop/29130)

<div class="topic-metadata">

**Author:** [@malvandi.m](https://discuss.kotlinlang.org/u/malvandi.m)\
**Replies:** 10\
**Last updated:** [August 26, 2024, 1:47pm UTC](https://discuss.kotlinlang.org/t/how-log-suspend-function-argument-with-aop/29130 "2024-08-26T13:47:11Z")

</div>

I’m using spring boot and I want to log suspend function call with AOP. for getting function arguments I use as follows: val methodArgs = joinPoint.args.joinToString() the result is as follows: Continuation at kotlin…

---

## [Ktor - dynamically install and uninstall modules?](https://discuss.kotlinlang.org/t/ktor-dynamically-install-and-uninstall-modules/20678)

<div class="topic-metadata">

**Author:** [@rnikander](https://discuss.kotlinlang.org/u/rnikander)\
**Replies:** 4\
**Last updated:** [May 29, 2024, 5:06am UTC](https://discuss.kotlinlang.org/t/ktor-dynamically-install-and-uninstall-modules/20678 "2024-05-29T05:06:29Z")

</div>

The Ktor examples I see are all statically defined in the Kotlin code. I’d like to be able to load and unload web apps, sort of like you do in servlet containers like Tomcat, Wildfly. Is that possible? In other words, …

---

## [Keeping data in memory instead of using databases](https://discuss.kotlinlang.org/t/keeping-data-in-memory-instead-of-using-databases/26336)

<div class="topic-metadata">

**Author:** [@Kotlinius](https://discuss.kotlinlang.org/u/Kotlinius)\
**Replies:** 35\
**Last updated:** [March 26, 2024, 10:58am UTC](https://discuss.kotlinlang.org/t/keeping-data-in-memory-instead-of-using-databases/26336 "2024-03-26T10:58:04Z")

</div>

Lately I have been developing server-side web apps where I keep all the data in memory instead of using databases. Sounds crazy, right? Of course, for apps with huge amounts of data this would not work. For apps with sma…

---

## [Can Coroutines leverage the new Loom compatible JDBC drivers?](https://discuss.kotlinlang.org/t/can-coroutines-leverage-the-new-loom-compatible-jdbc-drivers/27473)

<div class="topic-metadata">

**Author:** [@404-UserNotFound](https://discuss.kotlinlang.org/u/404-UserNotFound)\
**Replies:** 9\
**Last updated:** [October 11, 2023, 1:40pm UTC](https://discuss.kotlinlang.org/t/can-coroutines-leverage-the-new-loom-compatible-jdbc-drivers/27473 "2023-10-11T13:40:35Z")

</div>

With the introduction of Loom-compatible database drivers that enables non-blocking database operations, can coroutines also take advantage of these drivers? If not, would a hybrid approach like creating a custom dispatc…

---

## [Is it possible to configure KTOR at runtime from a properties file instead of environment variables?](https://discuss.kotlinlang.org/t/is-it-possible-to-configure-ktor-at-runtime-from-a-properties-file-instead-of-environment-variables/27226)

<div class="topic-metadata">

**Author:** [@Skater901](https://discuss.kotlinlang.org/u/Skater901)\
**Replies:** 0\
**Last updated:** [August 11, 2023, 8:20am UTC](https://discuss.kotlinlang.org/t/is-it-possible-to-configure-ktor-at-runtime-from-a-properties-file-instead-of-environment-variables/27226 "2023-08-11T08:20:33Z")

</div>

Hey all, basically as the title says. Is it possible to provide configuration values to KTOR at runtime from a properties file instead of passing environment variables? I don’t like environment variables compared to hav…

---

## [How would I run my own Kotlin Koans server?](https://discuss.kotlinlang.org/t/how-would-i-run-my-own-kotlin-koans-server/20273)

<div class="topic-metadata">

**Author:** [@ellenspertus](https://discuss.kotlinlang.org/u/ellenspertus)\
**Replies:** 1\
**Last updated:** [June 12, 2023, 10:05am UTC](https://discuss.kotlinlang.org/t/how-would-i-run-my-own-kotlin-koans-server/20273 "2023-06-12T10:05:08Z")

</div>

I’d like to create a fork of Kotlin Koans for my students, with videos interleaved. I see the GitHub repo, but it’s not clear to me how to create an interactive web service from it.

---

## [Mixing kotlinx with blocks of native javascript](https://discuss.kotlinlang.org/t/mixing-kotlinx-with-blocks-of-native-javascript/26821)

<div class="topic-metadata">

**Author:** [@martinstender](https://discuss.kotlinlang.org/u/martinstender)\
**Replies:** 2\
**Last updated:** [May 22, 2023, 1:48pm UTC](https://discuss.kotlinlang.org/t/mixing-kotlinx-with-blocks-of-native-javascript/26821 "2023-05-22T13:48:39Z")

</div>

Hi all, We are migrating from JSTL (.jsp and .tag view-files) to a much more structured code base, where we decouple backend and frontend with protobuf in between. Frontend markup is generated with kotlinx. Generally, a…

---

## [\[Academic\] \[Survey\] Java Spring Boot vs Ktor: Which Framework is More Accessible for New Developers? (All welcome)](https://discuss.kotlinlang.org/t/academic-survey-java-spring-boot-vs-ktor-which-framework-is-more-accessible-for-new-developers-all-welcome/26694)

<div class="topic-metadata">

**Author:** [@kevvo25](https://discuss.kotlinlang.org/u/kevvo25)\
**Replies:** 0\
**Last updated:** [April 15, 2023, 2:14pm UTC](https://discuss.kotlinlang.org/t/academic-survey-java-spring-boot-vs-ktor-which-framework-is-more-accessible-for-new-developers-all-welcome/26694 "2023-04-15T14:14:37Z")

</div>

Hello everyone, I am a student working on a research project comparing Ktor and Java Spring Boot in terms of cyclomatic complexity and ease of use. Your input as developers with experience in either or both of these fra…

---

## [Serve Kotlin/JS distribution as static assets in Kotlin/JVM project with Ktor](https://discuss.kotlinlang.org/t/serve-kotlin-js-distribution-as-static-assets-in-kotlin-jvm-project-with-ktor/17016)

<div class="topic-metadata">

**Author:** [@axelfontaine](https://discuss.kotlinlang.org/u/axelfontaine)\
**Replies:** 2\
**Last updated:** [March 7, 2023, 3:36pm UTC](https://discuss.kotlinlang.org/t/serve-kotlin-js-distribution-as-static-assets-in-kotlin-jvm-project-with-ktor/17016 "2023-03-07T15:36:03Z")

</div>

I have the following project structure: MyProjectBuiltWithGradle |- MyClientKotlinJSModule |- MyServerKotlinJVMModuleWithKtor What is the best way to take the assets produced by MyClientKotlinJSModule (resources + co…

---

## [Deprecation warning: use cssSupport methods instead](https://discuss.kotlinlang.org/t/deprecation-warning-use-csssupport-methods-instead/25966)

<div class="topic-metadata">

**Author:** [@peterbecker](https://discuss.kotlinlang.org/u/peterbecker)\
**Replies:** 5\
**Last updated:** [December 31, 2022, 5:13am UTC](https://discuss.kotlinlang.org/t/deprecation-warning-use-csssupport-methods-instead/25966 "2022-12-31T05:13:45Z")

</div>

I’m using Kotlin/JS as part of a Multiplatform project, and I followed the instructions I found in the documentation and elsewhere to add CSS support via the Gradle file (from the kotlin section): js { brows…

---

## [Log Ktor API response time](https://discuss.kotlinlang.org/t/log-ktor-api-response-time/19805)

<div class="topic-metadata">

**Author:** [@jrovira037](https://discuss.kotlinlang.org/u/jrovira037)\
**Replies:** 4\
**Last updated:** [November 22, 2022, 7:26am UTC](https://discuss.kotlinlang.org/t/log-ktor-api-response-time/19805 "2022-11-22T07:26:48Z")

</div>

Hi, I am working on a REST application using Ktor. To monitor performance, I was trying to get Ktor to output the response time of each request to console, but I could not find any info. Does anyone know how could I d…

---

## [Kotlin&Junit vs Groovy&Spock](https://discuss.kotlinlang.org/t/kotlin-junit-vs-groovy-spock/24767)

<div class="topic-metadata">

**Author:** [@capt.roof](https://discuss.kotlinlang.org/u/capt.roof)\
**Replies:** 1\
**Last updated:** [May 4, 2022, 2:17pm UTC](https://discuss.kotlinlang.org/t/kotlin-junit-vs-groovy-spock/24767 "2022-05-04T14:17:45Z")

</div>

Hi, We are in the team at the moment of choosing the method and language of testing the application. The fight continues between Kotlin + Junit + Mockk vs Groovy + Spock. For the convenience of writing, the fact that Jun…

---

## [Web framework with shared memory structure](https://discuss.kotlinlang.org/t/web-framework-with-shared-memory-structure/24078)

<div class="topic-metadata">

**Author:** [@maxime.blanc.49](https://discuss.kotlinlang.org/u/maxime.blanc.49)\
**Replies:** 0\
**Last updated:** [January 30, 2022, 10:42pm UTC](https://discuss.kotlinlang.org/t/web-framework-with-shared-memory-structure/24078 "2022-01-30T22:42:01Z")

</div>

I want to make a REST Api with Kotlin with multiple worker that will have the same shared memory to get the data. It will be only read no write. I need to store the data in the RAM due to response time issue, it can’t be…

---

## [Best way to approach JVM and JS DOMDocument manipulation](https://discuss.kotlinlang.org/t/best-way-to-approach-jvm-and-js-domdocument-manipulation/15761)

<div class="topic-metadata">

**Author:** [@avwie](https://discuss.kotlinlang.org/u/avwie)\
**Replies:** 4\
**Last updated:** [January 28, 2022, 7:54am UTC](https://discuss.kotlinlang.org/t/best-way-to-approach-jvm-and-js-domdocument-manipulation/15761 "2022-01-28T07:54:34Z")

</div>

So, here is the situation. Server: Kotin/JVM Client: VanillaJS DTO’s that are passed around: XML This is error prone, because we have two locations where the DTO’s are made and this is difficult to maintain. I am no…

---

## [Ktor IntelliJ Issue - unresolved reference: freemarker, html, locations](https://discuss.kotlinlang.org/t/ktor-intellij-issue-unresolved-reference-freemarker-html-locations/20682)

<div class="topic-metadata">

**Author:** [@torbengabriel](https://discuss.kotlinlang.org/u/torbengabriel)\
**Replies:** 2\
**Last updated:** [January 10, 2022, 2:53am UTC](https://discuss.kotlinlang.org/t/ktor-intellij-issue-unresolved-reference-freemarker-html-locations/20682 "2022-01-10T02:53:58Z")

</div>

Hello, I have a finished Ktor application that I haven’t opened for 6 months and all of a sudden the imports stop working. I got a lot of unresolved reference issues for: freemarker, html, location, css

---

## [Ktor Locations Slug](https://discuss.kotlinlang.org/t/ktor-locations-slug/23598)

<div class="topic-metadata">

**Author:** [@landis22b](https://discuss.kotlinlang.org/u/landis22b)\
**Replies:** 4\
**Last updated:** [December 7, 2021, 7:51am UTC](https://discuss.kotlinlang.org/t/ktor-locations-slug/23598 "2021-12-07T07:51:48Z")

</div>

I’m trying to write a slug for Locations and am struggling to figure out exactly how to do it. @Location("/files") class Files{ @Location("/view/{id}/{slug?}") data class View(val files: Files, val id: String, v…

---

## [Issues with importing files in HTML](https://discuss.kotlinlang.org/t/issues-with-importing-files-in-html/21876)

<div class="topic-metadata">

**Author:** [@alzomins](https://discuss.kotlinlang.org/u/alzomins)\
**Replies:** 0\
**Last updated:** [May 19, 2021, 11:22am UTC](https://discuss.kotlinlang.org/t/issues-with-importing-files-in-html/21876 "2021-05-19T11:22:33Z")

</div>

Hi all, I have exported files as below ( .js .d.js and package.json) and my own index.html page after running a page in chrome, an error appears (Uncaught ReferenceError: helloWorld is not defined) What shoul…

---

## [Issues with changing HLS video i video.js player](https://discuss.kotlinlang.org/t/issues-with-changing-hls-video-i-video-js-player/21741)

<div class="topic-metadata">

**Author:** [@alzomins](https://discuss.kotlinlang.org/u/alzomins)\
**Replies:** 0\
**Last updated:** [May 7, 2021, 7:37am UTC](https://discuss.kotlinlang.org/t/issues-with-changing-hls-video-i-video-js-player/21741 "2021-05-07T07:37:59Z")

</div>

Dear all, I am trying to play HLS video into video.js player. At the start, the video is playing well. The second step is to change the HLS URL video on the keypress on the keyboard, and then the problem starts. Follo…

---

## [Ktor login](https://discuss.kotlinlang.org/t/ktor-login/21502)

<div class="topic-metadata">

**Author:** [@vasiidanemanuelego](https://discuss.kotlinlang.org/u/vasiidanemanuelego)\
**Replies:** 0\
**Last updated:** [April 11, 2021, 10:31am UTC](https://discuss.kotlinlang.org/t/ktor-login/21502 "2021-04-11T10:31:09Z")

</div>

I am trying to make a login script in ktor using basic sessions. install(Sessions) { cookie( “login\_session” ){ cookie.path = “/” cookie.extensions\[“SameSite”\] = “lax” } } This is how I create the se…

---

## [HTML over the wire / Serverside reactivity](https://discuss.kotlinlang.org/t/html-over-the-wire-serverside-reactivity/21351)

<div class="topic-metadata">

**Author:** [@Kotlinius](https://discuss.kotlinlang.org/u/Kotlinius)\
**Replies:** 4\
**Last updated:** [March 28, 2021, 10:20am UTC](https://discuss.kotlinlang.org/t/html-over-the-wire-serverside-reactivity/21351 "2021-03-28T10:20:39Z")

</div>

JS frameworks like React, Vue and Svelte adds reactivity on the client side. When you update a certain text field, for example, other values reactively update based on your input. For example if you edit an element that …

---

## [KotlinJS demonstration project in modules](https://discuss.kotlinlang.org/t/kotlinjs-demonstration-project-in-modules/21345)

<div class="topic-metadata">

**Author:** [@zuzadu](https://discuss.kotlinlang.org/u/zuzadu)\
**Replies:** 0\
**Last updated:** [March 26, 2021, 9:44pm UTC](https://discuss.kotlinlang.org/t/kotlinjs-demonstration-project-in-modules/21345 "2021-03-26T21:44:05Z")

</div>

I have an application made a few years ago in KotlinJS, I need to update it I want to make it work with the gradle, but I don’t know how to configure it to use modules, I developed a model that is on GitHub. I need the …

---

## [How to add comment for kotlin HTML DSL?](https://discuss.kotlinlang.org/t/how-to-add-comment-for-kotlin-html-dsl/19035)

<div class="topic-metadata">

**Author:** [@abangkis](https://discuss.kotlinlang.org/u/abangkis)\
**Replies:** 5\
**Last updated:** [September 8, 2020, 5:29am UTC](https://discuss.kotlinlang.org/t/how-to-add-comment-for-kotlin-html-dsl/19035 "2020-09-08T05:29:24Z")

</div>

Is there a way to add html comment to kotlin HTML DSL like comment(“my comment”) that will result to \<!-- my comment --\>. Currently i’m using unsafe { +"""\<!-- my comment --\>"""} but it seems a bit off.

---

## [Mixing javascript with kotlin html dsl](https://discuss.kotlinlang.org/t/mixing-javascript-with-kotlin-html-dsl/21163)

<div class="topic-metadata">

**Author:** [@abangkis](https://discuss.kotlinlang.org/u/abangkis)\
**Replies:** 1\
**Last updated:** [March 16, 2021, 4:44am UTC](https://discuss.kotlinlang.org/t/mixing-javascript-with-kotlin-html-dsl/21163 "2021-03-16T04:44:13Z")

</div>

Hi, I have a form created using kotlin html dsl. Inside the form there’s a combo box that is populated using dataList. When a user click one of the combo box value. I want to fetch the data from the server and populate t…

[Next page](https://discuss.kotlinlang.org/c/web-development/12.md?page=1)
