|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.bea.content.manager.servlets.ShowPropertyServlet
com.bea.content.manager.servlets.ShowBinaryServlet
com.bea.p13n.content.servlets.ShowDocServlet
A servlet which will output a document to the client.
This will act like the ShowBinaryServlet. If the Node is not found in the repository, then this will perform the old behavior of using a DocumentManager
This understands 2 init parameters:
contentHome
: Specifies the default JNDI content home name.
If this is specified, then all contentHome request parameters will be
ignored. If contentHome is not specified as either an init or request
parameter, the default DocumentManager home will be used (which is
"java:comp/env/ejb/DocumentManager").
closeStreams
: true to have the servlet close output
streams when done, false to not. This defaults to false.
contentHome
: Specifies the JNDI content manager home name
to look for the document at, if the contentHome init parameters isn't
specified.
contentId
: Specifies the identifier of the document to
display. If not specified, an error message is displayed instead.
"com.bea.p13n.content.document.contentHome"
.
Field Summary | |
static String |
CONTENT_HOME_SESSION_NAME
Deprecated. The Session variable this will look for the contentHome in. |
protected String |
contentHome
Deprecated. The content home. |
static String |
DEF_MIME_TYPE
Deprecated. The default mime type. |
Fields inherited from class com.bea.content.manager.servlets.ShowPropertyServlet |
closeStreams, DEFAULT_MIME_TYPE, TEXT_MIME_TYPE |
Constructor Summary | |
ShowDocServlet()
Deprecated. |
Method Summary | |
void |
doPost(HttpServletRequest req,
HttpServletResponse resp)
Deprecated. Request entry point. |
void |
init()
Deprecated. Initialize the servlet. |
protected void |
showError(String error,
Throwable ex,
HttpServletResponse resp)
Deprecated. Print an error message to the output stream. |
Methods inherited from class com.bea.content.manager.servlets.ShowPropertyServlet |
doGet, ioReadWrite, nioRead, printNode |
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 |
public static final String CONTENT_HOME_SESSION_NAME
protected String contentHome
public static final String DEF_MIME_TYPE
Constructor Detail |
public ShowDocServlet()
Method Detail |
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
Override to first try the ShowBinaryServlet method to access the new content repository first. If that fails to find the Node, then this will access a ContentManager.
This method gets the contentId and contentHome. From that, it gets a Document object, from which, it outputs the document's content bytes to the output stream.
It will set the Content-Type, Content-Length, and Content-Disposition headers on the response to try to get the browser to do the correct thing.
doPost
in class ShowPropertyServlet
ServletException
IOException
public void init() throws ServletException
init
in class ShowPropertyServlet
ServletException
protected void showError(String error, Throwable ex, HttpServletResponse resp) throws ServletException, IOException
This assumes that nothing has been put on the response yet.
showError
in class ShowPropertyServlet
error
- the error message.ex
- a possible exception.resp
- the response to output to.
ServletException
IOException
|
© 2004 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |