Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.manager.servlets
Class ShowPropertyServlet

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              com.bea.content.manager.servlets.ShowPropertyServlet

All Implemented Interfaces
  Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

Direct Known Subclasses:
  ShowBinaryServlet

    public class ShowPropertyServlet

extends javax.servlet.http.HttpServlet

Writes a property of a Node to the response OutputStream. The available paramater options are as follows:

- 1) Pass the node Id in as a request parameter. Eg. http://server:port/app/ShowProperty?nodeId=/repo/12345&versionId=1.
- 2) Pass the node path as part of the the request pathInfo. Eg. http://server:port/app/ShowProperty/repo/path/nodeName. or for Versioned Content http://server:port/app/ShowProperty/repo/path/nodeName||versionId=1.
- 3) Pass the node path in as a request parameter. Eg. http://server:port/app/ShowProperty?nodePath=/repo/path/file.ext&versionId=10
- 4) To retrieve a property other than the primary property, pass the property name at the end of the path Eg. http://server:port/app/ShowProperty?nodePath=/repo/path/file.ext//binaryPropertyName?versionId=10

  With any of the above, if you would like to display a property other than the primary property, simply put "//propertyName" at the end of the parameter/pathInfo.

  See Also
    Serialized Form

  Field Summary
  `protected boolean` | `closeStreams` Should we close the output stream when done.
  `static String` | `DEFAULT_MIME_TYPE` The default mimetype used to render a node's binary property.
  `static String` | `TEXT_MIME_TYPE` Deprecated Not in use.

  Constructor Summary
  `ShowPropertyServlet()`

  Method Summary
  `void` | `doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` Called by the server (via the service method) to allow a servlet to handle a GET request.
  `void` | `doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` Called by the server (via the service method) to allow a servlet to handle a POST request.
  `void` | `init()` Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
  `protected void` | `ioReadWrite(InputStream is, OutputStream out)` Deprecated
  `protected byte[]` | `nioRead(FileInputStream is)` Deprecated
  `protected void` | `printNode(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)` Prints out the value of the content property from the Node specified in the request.
  `protected void` | `showError(String error, Throwable ex, javax.servlet.http.HttpServletResponse resp)` Output in the case of an error.

  Methods inherited from class javax.servlet.http.HttpServlet
  `doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service`

  Methods inherited from class javax.servlet.GenericServlet
  `destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

  Methods inherited from class java.lang.Object
  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  Field Detail

  ### DEFAULT_MIME_TYPE

      public static final String DEFAULT_MIME_TYPE

    The default mimetype used to render a node's binary property.

    See Also
      Constants Summary

  ### TEXT_MIME_TYPE

      @Deprecated
      public static final String TEXT_MIME_TYPE

    Deprecated Not in use.
    See Also
      Constants Summary

  ### closeStreams

      protected boolean closeStreams

    Should we close the output stream when done. This will be initialized from the "closeStreams" initialized parameter.

  Constructor Detail

  ### ShowPropertyServlet

      public ShowPropertyServlet()

  Method Detail

  ### init

      public void init()
                throws javax.servlet.ServletException

    Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

    Overrides:
      `init` in class `javax.servlet.GenericServlet`
    Throws
      `javax.servlet.ServletException`

  ### doGet

      public void doGet(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse resp)
                 throws javax.servlet.ServletException,
                        IOException

    Called by the server (via the service method) to allow a servlet to handle a GET request.

    Overrides:
      `doGet` in class `javax.servlet.http.HttpServlet`
    Throws
      `javax.servlet.ServletException`
      `IOException`

  ### doPost

      public void doPost(javax.servlet.http.HttpServletRequest req,
                         javax.servlet.http.HttpServletResponse resp)
                  throws javax.servlet.ServletException,
                         IOException

    Called by the server (via the service method) to allow a servlet to handle a POST request. The HTTP POST method allows the client to send data of unlimited length to the Web server a single time and is useful when posting information such as credit card numbers.

    Overrides:
      `doPost` in class `javax.servlet.http.HttpServlet`
    Throws
      `javax.servlet.ServletException`
      `IOException`

  ### printNode

      protected void printNode(javax.servlet.http.HttpServletRequest req,
                               javax.servlet.http.HttpServletResponse resp)
                        throws IOException,
                               RepositoryException,
                               IllegalArgumentException,
                               javax.servlet.ServletException

    Prints out the value of the content property from the Node specified in the request.

    This will not print any error messages to the response.

    Throws
      `IOException` - thrown on an error printing.
      `RepositoryException` - thrown on an error talking to the repository or the Node doesn't have a content property to display.
      `IllegalArgumentException` - thrown if the request doesn't contain a valid node path or the node wasn't found.
      `javax.servlet.ServletException`

  ### nioRead

      @Deprecated
      protected byte[] nioRead(FileInputStream is)
                        throws IOException

    Deprecated

    Read a file input stream into a byte array using nio

    Throws
      `IOException`

  ### ioReadWrite

      @Deprecated
      protected void ioReadWrite(InputStream is,
                                            OutputStream out)
                          throws IOException

    Deprecated

    Writes the input stream to the output stream.

    Throws
      `IOException`

  ### showError

      protected void showError(String error,
                               Throwable ex,
                               javax.servlet.http.HttpServletResponse resp)
                        throws javax.servlet.ServletException,
                               IOException

    Output in the case of an error.

    Throws
      `javax.servlet.ServletException`
      `IOException`

  Overview | Package | Class | Tree | Deprecated | Index | Help
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

  Copyright © 2008 BEA Systems, Inc. All Rights Reserved