Skip to content

Instantly share code, notes, and snippets.

@lordofthejars
Created September 18, 2014 11:43
Show Gist options
  • Select an option

  • Save lordofthejars/b26a2096b5be8d5c260c to your computer and use it in GitHub Desktop.

Select an option

Save lordofthejars/b26a2096b5be8d5c260c to your computer and use it in GitHub Desktop.
import javax.ejb.Stateless;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Stateless
@Path("/sample")
public class SampleController {
@GET
@Produces("text/plain")
public String sample() {
return "Hello World";
}
public static void main(String args[]) {
TomEEApplication.run(HelloWorldServlet.class, SampleController.class);
}
}
@rich4j
Copy link
Copy Markdown

rich4j commented Sep 18, 2014

Do you need HelloWorldServlet.class referenced on line 17? Blog post does not explain it's purpose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment