|
Re: pretty printing page output: msg#00107java.enhydra.xmlc
On Wednesday, September 17, 2003, at 09:50 PM, Jacob Kjome wrote: At 02:21 PM 9/15/2003 -0700, you wrote: I went with the DOMFormatter because the XMLCContext was giving me grief when reloading my webapp in Tomcat. I'm running Tomcat from within JBoss. For some reason it is not noticing changes to my servlet so I have to touch web.xml. This redeploys the servlet, but something happens to the context because from that point on XMLCContext.getContext(this) will return null. To get around this I have to restart Tomcat/JBoss. The DOMFormatter does not suffer from this problem so I'm using it for now. Only thing is that I've made use of OutputOptions and I still see no change in the source output. try{ response.setContentType("text/html"); OutputOptions output = new OutputOptions(); output.setPrettyPrinting(true); output.setFormat(OutputOptions.FORMAT_HTML); output.setIndentSize(2); DOMFormatter df = new DOMFormatter(); df.setOutputOptions(output); ServletOutputStream sos = response.getOutputStream(); df.write(page, sos); }catch(IOException izzy){ izzy.printStackTrace(); } Anything else I need to do to get it formatted? Thanks, -M@
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: pretty printing page output, Jacob Kjome |
|---|---|
| Next by Date: | question(bug) about setNodeValue, linuxman |
| Previous by Thread: | Re: pretty printing page output, Jacob Kjome |
| Next by Thread: | Re: pretty printing page output, Petr Stehlik |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |