Sling Servlet Service
Hi Team,
I have create a POST sling servlet in CQ.
And on form submit to this servlet am running the junit test case as below.
@Override
protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException
{
//Do something fun here
response.setContentType("text/plain");
response.getOutputStream().print("Hello POST AbsoluteUrlServlet World!");
JUnitCore testcase = new JUnitCore();
testcase.run(SampleTestMadhu.class);
}
But am getting the below error
org/junit/runner/JUnitCore
Cannot serve request to /bin/acme/my/servlet in com.mycompany.myproject.AbsoluteUrlServlet
Exception:
java.lang.NoClassDefFoundError: org/junit/runner/JUnitCore
I have installed Junit and junit runner bundle is osgi container but still getting this error.
Please help.
