Make servlet output html

I am a newbie to plugin writing so please be patient:

I am trying to implement an in/out board that works similar to the presence plugin. I would like this to be accessible to everyone on the LAN/VPN. I was thinking of implementing this as a servlet.

I was able to get my test plugin to build and install ok using text/plain content type. But when I try to use text/html content type I am always redirected through the admin console. Is is possible to output html content from a custom servlet?

Also, I can’'t seem to get the AuthCheckFilter.addExclude(“myPlugin”); to work. If I am logged in, I either get the text/plain content I expected or my html content in the admin console. If I am not logged in, I get a NullPointerException

Any ideas?

Thanks in advance

Since nobody else can (or cares to)…I will answer my own question:

The AuthCheckFilter problem was not a problem after all–I simply put the wrong url pattern in the method argument. OK

As far as displaying an html page from a custom servlet:

jive uses sitemesh which is configured in sitemesh.xml. The default configuration is to capture all text/html content from the server and force it into the admin page. This means that your servlets can output any recognized Content-type BUT html. Sitemesh is also uses decorators.xml to define which pages are decorated. If you want to output html content, you need to add the desired url pattern to the excludes element in decorators.xml and restart the server. This should also work for arbitrary jsp/html, etc.

I don’'t know why this question went unanswered for so long. This would have been simple for anyone familiar with jive.

Hope this helps any other developers with similar problems

Hi Scott,

Did you try adding the following in portion of the html you’'re generating:

This will tell SiteMesh to not decorate that page and you won’'t have to alter the sitemesh.xml file.

Thanks,

Ryan

Didn’‘t know I could do that. I had never heard of sitemesh until today. I’'ll give the meta tag a try. This would be better than changing the xml config for my purposes.

Thanks for the tip!

Thanks for the tip!

No problem. Matt actually mentioned it in a thread a week or two back where he also pointed out that it is in the url=http://www.jivesoftware.org/builds/messenger/docs/latest/documentation/plugi n-dev-guide.htmlPlugin Development Guide[/url].

Again,my mistake. I was using the plugin dev guide that I had printed off from a previous version. I’'ll update my documentation from the most recent version.

Thanks for your patience