ctx.render() doesn't work from "java -jar"
See original GitHub issueDescribe the bug
The ctx.render()
method, as shown in the following code:
public static void main(String[] args) {
Blade.of()
.get("/", ctx -> ctx.render("index.html"))
.start(Application.class, args);
}
it DOES work when run from the IDE (Run as Java Application from Eclipse)
it DOES NOT work when run from the CLI (java -jar target\blade-app.jar
)
To Reproduce
Run the attached package with java -jar
.
Screenshots
From CLI it doesn’t work:
From Eclipse it works:
Additional context
I suspect everything is bound to the app.classpath
.
Run with the IDE:
c.b.s.n.NettyServer : app.classpath => C:/Users/a.ligios/git/blade/app/target/classes/
Run with java -jar
:
c.b.s.n.NettyServer : app.classpath => C:\Users\a.ligios\git\blade\app\target\blade-app.jar
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
ctx.render doesn't redirect the page - Stack Overflow
I want to put jwt data into pug file but when I send get request, the page only just refreshes itself and doesn't...
Read more >Documentation - A lightweight Java and Kotlin web framework
Javalin - A lightweight Java and Kotlin web framework. Create REST APIs in Java or Kotlin easily.
Read more >Developer Guide - Apache Velocity Engine
Velocity is a Java-based template engine, a simple and powerful development tool that allows you to easily create and render documents that format...
Read more >Spring Boot Memory Performance
A completely minimal Spring Boot application including Spring and some logging but no web server would be around 5MB of jars. JVM Tools....
Read more >Can't open .jar files using Java 17, please help!
I tried reinstalling Java 17, and it still didn't work. When I clicked open with>choose another app>more apps>look for another app on this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@andrea-ligios The
2.0.13.ALPHA
version of the Windows system works.Perfect! Thank you @biezhi