Hi Jason You should be able to create a "txt.jsp" file and call your resource with the "txt" extension. I.e. /content/foo.txt. This is assuming that your resource is "/content/foo" and not "/content/foo.html".
Implementing a servlet is (largely) equivalent to implementing a JSP. So choose whichever is more convenient for implementing your rendition. Regards Julian On Mon, Nov 24, 2014 at 7:48 PM, Jason Bailey <[email protected]> wrote: > I'm still feeling my way around the right way to implement solutions in Sling > that follow "sling thinking" and I'm hoping to get some confirmation from the > community. > I've got a requirement where I need to render an html page as text. It > doesn't need to be perfect and I understand that there will be problems with > any solution I come up with - that's acknowledged. > > The two ways I have come up with so far are either as a selector, so that I > can call /content/foo.html as /content/foo.text.html and then have a text.jsp > under a component or maybe a pipeline service that listens for that selector > and filters out the text. The other consideration, which I'm leaning towards, > is a SlingServlet which would handle the txt extension where I would have it > iterate through the page resources and compare with a list of whiteboard > services that would render out text where appropriate. > > Anybody know if I'm missing a third option? > > TIA > -Jason
