My RESTful jersey project (dynamic web project) name is "my-jersey".
I have resource class defined following method:
@Path("/my")
public class resource{
@GET
@Produces(MediaType.TEXT_PLAIN)
public String sayPlainTextHello() {
return "Hello Jersey";
}
}
my web.xml:
<servlet-mapping>
<servlet-name>myjersey</servlet-name>
<url-pattern>/my/*</url-pattern>
</servlet-mapping>
When I run my web app in Eclipse. Why the firstly loaded page URL is
http://localhost:8080/my-jersey/
which is an blank.
Question 1. Why it does not display "Hello jersey" ?
Question 2. If I would like the first loaded page is a html file, how and where to specify this? In web.xml ?? How to specify the first load page is myfirstpage.html?
Question 3. Where should I put this myfirstpage.html in the project? Under which directory? (I am using Eclipse dynamic web project to develop the jersey app.)