我创建了一个OSGi Bundle并上传到CQ5服务器。这个包包含一个像这样的SlingServlet:
@SlingServlet(paths = { "/rest/matches" }, methods = { "POST", "GET" })
public class MatchDayRestServlet extends SlingAllMethodsServlet {
private static final long serialVersionUID = 5088643736228890684L;
@Override
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException {
String responseString = "Hello World!";
response.setStatus(HttpServletResponse.SC_OK);
response.getWriter().write(responseString);
response.getWriter().flush();
response.getWriter().close();
}
}
现在我被困了,因为我不知道我应该用什么URL来对这个servlet进行GET调用。
我的CRXDE位于http://HOST:IP/crx/de/index.jsp