cancel
Showing results for 
Search instead for 
Did you mean: 

how to suppress the html comment at start of output

Former Member
0 Kudos

Hi,

Does anyone know how to suppress the html comment that ITS inserts at the beginning of the response content.

i.e.:

-


<!--

This page was created by the

SAP Internet Transaction Server (ITS, Version 6100.1030.61.1891, Build 610.611891, Virtual Server SY1, WGate-AGate Host aauwsd00, WGate-Instance SY1)

...

Template: znc_xworktime/99/xml.html -->

-


This appears to be causing havoc with the applet's XML parser...

-


org.jdom.input.JDOMParseException: Error on line 8: XML declaration may only begin entities.

at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468)

at org.jdom.input.SAXBuilder.build(SAXBuilder.java:770)

at com.alcatel.ontap.applets.timesheet.TimesheetTableLoader.run(TimesheetTableLoader.java:75)

Caused by: org.xml.sax.SAXParseException: XML declaration may only begin entities.

at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3376)

at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3364)

at org.apache.crimson.parser.Parser2.maybePI(Parser2.java:1140)

at org.apache.crimson.parser.Parser2.maybeMisc(Parser2.java:1266)

at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:654)

at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)

at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)

at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)

... 2 more

-


Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

Check out OSS Note No.747818

You can use the ~no_its_header parameter to deactivate the default

header that is generated. As soon as this parameter contains any value,

header generation is suppressed. In ITS 6.20, you can set the parameter

with the AdminTool. You will find the relevant switch under

Security-General.

If the ITS is integrated into the WebAS (SAP Netweaver 04 and higher),

you must maintain the parameter in the ICF service. Note that you have

to maintain the parameter individually for each service.

Regards

Raja

Former Member
0 Kudos

Thanks Raja,

This suppressed the header comment.

Still some whitespace (an empty line) before the xml declaration <?xml version="1.0"?>. The declaration is at the very top of the template html.

The Crimson XML parser doesn't like this and I still get the error, but now on line 2 instead of line 8.

Maybe I can find a way around this in the applet.

Use another XML parser, filter the input stream ...

Maybe there is a switch I can use on the parser.

I managed to get valid XML out of ITS using WebRFC. But this will not be suitable where XML is going both ways. The applet cannot post XML to WebRFC as WebRFC only accepts GET (Query String).

The applet is being designed to work with J2EE aswell as ITS simply by specifying a base data URL in it's plugin (object/embed) tag.

Answers (1)

Answers (1)

Former Member
0 Kudos

Just an addendum ...

I googled an answer to the whitespace before the xml declaration problem.

Drop the xml declaration.

No nice, but nether is ITS

Anyone else had/having fun with XML and ITS?