Seems I managed to find a solution to the major part of my problem. In
following the directions on the site in my previous post I had used an old
version of the maven scr plug in that didn't work with the newer @Service,
@Component, etc and only the @scr.service, etc.. When I changed the version
of my src plugin in the POM the servlet and services started being
registered properly.
I have been encountering one slightly odd problem however. When attempting
to register a servlet as a resourceType instead of using a path, when I
attempt to access the servlet the output is always blank/empty. I am using
the following two lines for a simple hello world output:
response.setContentType("text/plain");
response.getWriter().write("Hello World");
I have also tried changing the second line for:
response.getOutpustream().print("Hello World");
And I have tried flushing the output buffer at the end with:
response.flushBuffer();
--
View this message in context:
http://apache-sling.73963.n3.nabble.com/Maven-Project-for-Initial-Content-and-Servlets-Bundle-tp4029856p4029862.html
Sent from the Sling - Users mailing list archive at Nabble.com.