OK, I'll try this, but I thought that the HttpConnector expected
the HTTP protocol, and I can't use that (for various reasons).

This isn't a web project, it's going to be used in a totally different
way.

I'd rather base this on the Servlet class, which doesn't have the
overhead of the HttpServlet, though.

> If your goal is to write a servlet that reads and 
> writes XML, then there is a simple way to do that. You 
> can extend HttpServlet and over-ride doPost(...), 
> not doGet(...).  Then....
> 
> To Read, parse the params out of the HttpServletRequest  as bytes:
> 
>       while (iBytesRead > -1)
>       {
>         iBytesRead = sIn.readLine(bArry, iOffset, iLen);
>         sLine = new String(bArry);
>         //System.out.println("Bytes Read = " + iBytesRead);
>         if (iBytesRead > 0)
>         {
>           //System.out.println(iCtr + ":" + sLine);
>           parseXMLParams(sLine);
>         }
>         iOffset += iBytesRead;
>         iCtr++;
>       }
> 
> To write, just output xml instead of HTML.  Crimson is a great
> Java based parser for building your output.  If you want to get 
> even fancier yet, you can paginate your results too. Alternatively,
> check out Cocoon (an XML based apache web publishing project), or SOAP
> (protocol also based on XML). 
> 
> - Joel
> 
> -----Original Message-----
> From: D. Jay Newman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 23, 2001 12:17 PM
> To: [EMAIL PROTECTED]
> Subject: Non http servlet?
> 
> Hi:
> 
> I need to create a servlet extended from Servlet rather than HttpServlet.
> 
> I will be using a protocol based on XML rather than HTTP.
> 
> Is it possible to do this using Tomcat? If so, any hints?
-- 
D. Jay Newman                   ! For the pleasure and the profit it derives
[EMAIL PROTECTED]              ! I arrange things, like furniture, and
http://www.sprucegrove.com/~jay/   ! daffodils, and ...lives.  -- Hello Dolly

Reply via email to