users@glassfish.java.net

Re: Disable HTTP TRACE

From: <glassfish_at_javadesktop.org>
Date: Thu, 03 Dec 2009 09:33:10 PST

I don't know why my reply becomes an attachment. Just copy it here again.
I am also attaching the 2 screenshot for v3.

If you are using GlassFish v2, you need to set the property "traceEnabled" to "true" or "false" under <http-service>.
Here is the reference documentation that lists out all the property name for http-service. http://docs.sun.com/app/docs/doc/820-4338/abhcq?a=view

If you are using GlassFish v3, you don't need to dig out the property names. They are now attributes under <http> element which is under <protocol>. The attribute name is "trace-enabled" and default to "true" as well.

Here is the instruction for changing this in v3:

Using Admin Console:
expand Configuration -> Network Config -> Network Listeners
Click the listener name that you want to configure.
You can then change the Trace Enabled checkbox under the HTTP Tab.
I will attach a screenshot.

Using CLI
You need to find out the name of the protocol that your listener is using. The following example shows you how to get the current setting and change it to false. By default, Trace is enabled.
Note: you need the protocol name, the example below says "http-listener-1" only because the Name of the protocol is "http-listener-1".

%./asadmin get configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled
configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true

Command get executed successfully.

%./asadmin set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=false
configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=false

Command set executed successfully.

Hope this help.
Anissa.
[Message sent by forum member 'anilam' ]

http://forums.java.net/jive/thread.jspa?messageID=374595