You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by karthik ananth <ka...@gmail.com> on 2009/04/20 08:47:09 UTC

HTML response using Abdera

Hi All,

I am building an application where in I need to have feed as response
for few requests and html as response for some other requests. I am
using Abdera servlet to serve feed and I wonder if I could use the
same servlet to serve HTML content. I searched all ResponseContexts
and found that  a ResponseContext  can be built out of a feed.

My questions:
1. Is there a way to send HTML content(as response) through AbderaServlet?
2. Anybody in list faced and solved similar problem? - please give few tips

-- 
Regards
Karthik

RE: HTML response using Abdera

Posted by Jeff Klein <je...@markmonitor.com>.
Hi Karthik,

The short answer is no- the AbderaServlet (or better yet the
AbderaSpringServlet...) does not return HTML natively- it returns
well-formed XML in AtomPub format. The long answer is that you can
return any mime type (including html or xhtml) embedded within the atom
response. Simply build your response and then pass it via
CollectionAdapter.setContent(). Downstream, retrieve the content via
AbderaClient.getContent() and do whatever you need to with it. Hope this
helps.

Jeff

-----Original Message-----
From: karthik ananth [mailto:karthik.jcecs@gmail.com] 
Sent: Sunday, April 19, 2009 11:47 PM
To: user@abdera.apache.org
Subject: HTML response using Abdera

Hi All,

I am building an application where in I need to have feed as response
for few requests and html as response for some other requests. I am
using Abdera servlet to serve feed and I wonder if I could use the same
servlet to serve HTML content. I searched all ResponseContexts and found
that  a ResponseContext  can be built out of a feed.

My questions:
1. Is there a way to send HTML content(as response) through
AbderaServlet?
2. Anybody in list faced and solved similar problem? - please give few
tips

--
Regards
Karthik