All Downloads are FREE. Search and download functionalities are using the official Maven repository.

en.help.task-protocolnew.html Maven / Gradle / Ivy

The newest version!


To Create a Protocol

  1. In the navigation tree, expand the Configuration node.

  2. Under the Configuration node, expand the Network Config node.

  3. Under the Network Config node, select the Protocols node.

    The Protocols page opens.

  4. On the Protocols page, click New.

    The New Protocol page opens.

  5. In the Name field, type a unique name for the protocol.

  6. Select the Security Enabled checkbox to enable security for the protocol.

    This option is disabled by default. If you enable security, you can use the SSL tab of the Edit Protocol page to modify the security settings.

  7. Select the Status Enabled checkbox to enable the file cache.

    This option is enabled by default.

  8. In the Max Age field, type the maximum age, in seconds, for a valid cache entry.

    This parameter controls how long cached information is used after a file has been cached. An entry older than the maximum age is replaced by a new entry for the same file. If your content changes infrequently, increase this value for improved performance.

    The optimum maximum age depends on whether existing files are modified regularly. For example, if files are modified four times a day at regular intervals, consider setting the maximum age to 21600 seconds (6 hours). Otherwise, consider setting the maximum age to the longest time for which you are willing to serve the previous version of a file after the file has been modified.

    The default value is 30.

  9. In the Max Cache Size field, type the maximum total size (in bytes) of the file cache on disk.

    The default value is 10485760.

  10. In the Max File Count field, type the maximum number of files that can be stored in the file cache.

    If the value is too big, the server caches little-needed files, which wastes memory. If the value is too small, the benefit of caching is lost. Try different values of this attribute to find the optimal solution for specific applications.

    The default value is 1024.

  11. In the Server Name field, type the host name to be used in the URLs the server sends to the client.

    This name is the alias name if your server uses an alias. If your server does not use an alias, leave this field blank.

    This value affects URLs the server automatically generates; it does not affect the URLs for directories and files stored in the server. If your server uses an alias, the server-name should be the alias name. If a colon and port number are appended, that port is used in URLs the server sends to the client. If a scheme and :// are prepended, the scheme will be used in the URLs.

  12. From the Default Virtual Server drop-down list, select the virtual server to be associated with this protocol.

    Use the Virtual Servers page to define virtual servers.

  13. In the Redirect Port field, type the port value to be used to redirect a request to another port.

    The GlassFish Server automatically redirects the request if these two conditions exist:

    • The network listener that references this protocol is supporting non-SSL requests.

    • A request is received for which a matching security constraint requires SSL transport.

    If a redirect port is not specified, the GlassFish Server uses the port number specified in the original request. By default, no port is specified.

  14. In the Max Connections field, type the maximum number of requests that can be pipelined until the connection is closed by the server.

    The Keep-Alive subsystem periodically polls idle connections. The default value is 256.

    Set this property to 1 to disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and pipelining. A value of 0 means requests are always rejected. A value of -1 sets no limit to the number of keep-alive connections.

  15. In the Timeout field, type the maximum time in seconds that a connection can be deemed as idle and kept in the keep-alive state.

    A value of 0 or less means that keep-alive connections are kept open indefinitely. The default value is 30 seconds.

  16. Select the Upload Timeout Enabled checkbox to cause the connection for a servlet that reads bytes slowly to be closed after the Connection Upload Timeout limit is reached.

    If this option is disabled, servlet connections do not time out. This option is disabled by default.

  17. In the Connection Upload Timeout field, type the timeout for uploads, in milliseconds.

    This field is applicable only if the Upload Timeout Disabled checkbox is selected. The default value is 300000 milliseconds.

  18. In the Request Timeout field, type the number of seconds before a request times out.

    If the request is not processed before the timeout value is reached, the request is ignored. The default value is 30 seconds.

  19. In the Send Buffer Size field, type the size in bytes of the send buffer.

    The default value is 8192 bytes.

  20. In the Header Buffer Length field, type the size in bytes of the buffer used by the request processing threads to read the request data.

    The default value is 8192 bytes.

  21. In the Max Post Size field, type the maximum size in bytes of POST actions.

    The default value is 2097152 bytes.

  22. In the URI Encoding field, type the name of the character set used to decode the request URIs received.

    The value must be a valid IANA character set name. The default value is UTF-8.

  23. In the Version field, type the version of the HTTP protocol used.

    The default value is HTTP/1.1.

  24. From the Compression drop-down list, select the use of HTTP/1.1 GZIP compression to save server bandwidth.

    Available choices are:

    on

    Compresses data.

    off

    Disables compression.

    force

    Forces data compression in all cases.

    The default value is off.

  25. In the Compressible Mime Types field, type a comma-separated list of MIME types for which HTTP compression is used.

    The default value is text/html,text/xml,text/plain.

  26. In the Compression Minimum Size field, type the minimum size of a file when compression is applied.

    This value must be set if Compression is set to on or force. The default value is 2048 bytes.

  27. In the No-Compression User Agents field, type a comma-separated list of regular expressions matching user-agents of HTTP clients for which compression should not be used.

    By default, this value is an empty string.

  28. In the Restricted User Agent field, type a list of restricted user agents on which HTTP compression is applied.

    If no user agents are specified, HTTP compression is applied to all user agents. By default, no user agents are specified.

  29. In the Default Response Type field, type a string that specifies the default response type.

    The format is a semicolon-delimited string consisting of the content-type, encoding, language, and charset. The default value is text/html; charset=iso-8859-1.

  30. In the Forced Response Type field, type a string that specifies the request type used if no MIME mapping is available that matches the file extension.

    The format is a semicolon-delimited string consisting of the content-type, encoding, language, and charset. The default value is text/html; charset=iso-8859-1.

  31. In the Adapter field, type the class name of the static resources adapter.

    The default value is com.sun.grizzly.tcp.StaticResourcesAdapter.

  32. Select the Comet Support Enabled checkbox to enable Comet support for the network listener that references this protocol.

    By default, this option is disabled. If your servlet or JSP page uses Comet technology, make sure it is initialized when the GlassFish Server starts up by adding the load-on-startup element to your web.xml file. For example:

    <servlet>
    <servlet-name>CheckIn</servlet-name>
    <servlet-class>CheckInServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    
  33. Select the DNS Lookup Enabled checkbox to enable DNS lookup.

    This option is disabled by default.

  34. Select the RCM Support Enabled checkbox to enable Resource Configuration Management (RCM).

    This option is disabled by default.

  35. Select the Trace Enabled checkbox to enable the TRACE operation.

    If this option is disabled, the GlassFish Server is less susceptible to cross-site scripting attacks. This option is enabled by default.

  36. Select the Auth Pass Through Enabled checkbox to indicate that the network listener that uses this protocol receives traffic from an SSL-terminating proxy server.

    This option is disabled by default.

  37. Select the Chunking Enabled checkbox to enable HTTP response chunking.

    This option is enabled by default.

  38. Select the XPowered By Enabled checkbox to tell the GlassFish Server to use X-Powered-By headers according to the Java Servlet 3.0 and Java Server Pages 2.0 specifications.

    This option is enabled by default.

Next Steps

After you create a protocol, you can create a network listener that uses the protocol.

See Also
Copyright © 2005, 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices




© 2015 - 2024 Weber Informatics LLC | Privacy Policy