Search code examples
mavenjettyembedded-jettymaven-jetty-plugin

Jetty use a servlet


I am trying to make a jetty web app to display content from a template.
The code I have is a java file with the class that holds the information, a pom file, and a template.tpl file.
When I run mvn jetty:run, it spins up a server on port 8080 and points to the root od my web app folder.
How do I make it so when I type /template.tpl i can run java to fill the template?
Thanks in advance


Solution

  • Have you configured a web.xml file yet? Here's a guide on how to do this. Basically in your web.xml file, you configure the Servlets you write and map them to matching urls.