Is there any simple java web framework like sinatra (for ruby) or web.py (for python)?
A Java framework is specific to the Java programming language, used as a platform for developing software applications and Java programs. Java frameworks may include predefined classes and functions used to process, input, and manage hardware devices, as well as interact with system software.
Servlets and JSPs The Servlet and JSP are incredibly simple ways to handle an incoming request, and to develop HTML that gets displayed inside a client's web browser, respectively. All the existing Java-based web frameworks simply build on top of the Servlet and JSP API.
If you want a strict Java framework Spark might be an alternative:
import static spark.Spark.*; public class HelloWorld { public static void main(String[] args) { get("/hello", (req, res) -> "Hello World"); } }
Play. Haven't tried it myself but heard only good things about it and seems to be quite beginner-friendly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With