I created a Dynamic Web Project in Java using Eclipse JEE to make a REST web service. I am trying to add a html file simply to add a form that allows me to test my web services in a faster and easier way.
I have read that just placing the html files under the WebContent
folder or the WEB-INF
folder does the trick. But since I already have a web.xml
file it's disrupting the expected behaviour:
This is my web.xml
file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<servlet>
<servlet-name>REST web service</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>ws,com.fasterxml.jackson.jaxrs.json</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>REST web service</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
So where should I place my html files and what should I modify in my web.xml
file to get it working (if it needs to be modified)?