Jetty use a servlet

186 Views Asked by At

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

1

There are 1 best solutions below

1
prohit On BEST ANSWER

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.