java-rmi.cgi 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/bin/sh
  2. #
  3. # Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
  4. # ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  5. #
  6. #
  7. #
  8. #
  9. #
  10. #
  11. #
  12. #
  13. #
  14. #
  15. #
  16. #
  17. #
  18. #
  19. #
  20. #
  21. #
  22. #
  23. #
  24. #
  25. #
  26. #
  27. #
  28. #
  29. # This script executes the Java interpreter, defines properties
  30. # that correspond to the CGI 1.0 environment variables, and executes
  31. # the class "sun.rmi.transport.proxy.CGIHandler". It should be
  32. # installed in the directory to which the HTTP server maps the
  33. # URL path "/cgi-bin".
  34. #
  35. # (Configuration is necessary as noted below.)
  36. #
  37. # This class will support a QUERY_STRING of the form "forward=<port>"
  38. # with a REQUEST_METHOD "POST". The body of the request will be
  39. # forwarded (as another POST request) to the server listening on the
  40. # specified port (must be >= 1024). The response from this forwarded
  41. # request will be the response to the original request.
  42. #
  43. # CONFIGURATION:
  44. #
  45. # Fill in correct absolute path to Java interpreter below. For example,
  46. # the "PATH=" line might be changed to the follow if the JDK is installed
  47. # at the path "/home/peter/java":
  48. #
  49. # PATH=/home/peter/java/bin:$PATH
  50. #
  51. PATH=/usr/local/java/bin:$PATH
  52. exec java \
  53. -DAUTH_TYPE="$AUTH_TYPE" \
  54. -DCONTENT_LENGTH="$CONTENT_LENGTH" \
  55. -DCONTENT_TYPE="$CONTENT_TYPE" \
  56. -DGATEWAY_INTERFACE="$GATEWAY_INTERFACE" \
  57. -DHTTP_ACCEPT="$HTTP_ACCEPT" \
  58. -DPATH_INFO="$PATH_INFO" \
  59. -DPATH_TRANSLATED="$PATH_TRANSLATED" \
  60. -DQUERY_STRING="$QUERY_STRING" \
  61. -DREMOTE_ADDR="$REMOTE_ADDR" \
  62. -DREMOTE_HOST="$REMOTE_HOST" \
  63. -DREMOTE_IDENT="$REMOTE_IDENT" \
  64. -DREMOTE_USER="$REMOTE_USER" \
  65. -DREQUEST_METHOD="$REQUEST_METHOD" \
  66. -DSCRIPT_NAME="$SCRIPT_NAME" \
  67. -DSERVER_NAME="$SERVER_NAME" \
  68. -DSERVER_PORT="$SERVER_PORT" \
  69. -DSERVER_PROTOCOL="$SERVER_PROTOCOL" \
  70. -DSERVER_SOFTWARE="$SERVER_SOFTWARE" \
  71. sun.rmi.transport.proxy.CGIHandler