Announcement Announcement Module
No announcement yet.
StatusReportValve URI Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • StatusReportValve URI

    From the tc Server documentation at

    error.XXX=file://valid/file/path/URI: Specifies that when tc Runtime encounters the XXX status code, it should display the specified URI. If the URI is not valid, the file doesn't exist, or it is not readable, tc Runtime ignores the status code.

    I've configured the service element of my server.xml thusly

      <Service name="Catalina">
        <Executor maxThreads="300" minSpareThreads="50" name="tcbio" namePrefix="tcbio:" />
        <Connector protocol="org.apache.coyote.http11.Http11Protocol" executor="tcbio" port="${bio.http.port}" 
          redirectPort="${bio.https.port}" />
        <Engine name="Catalina" defaultHost="localhost">
           <Valve className=""
          <Valve className="com.springsource.tcserver.serviceability.request.ThreadDiagnosticsValve" logExtendedData="true" />
          <Host appBase="webapps" deployOnStartup="true" name="localhost">
            <Valve className="org.apache.catalina.valves.AccessLogValve" pattern="combined" prefix="localhost-access" suffix=".log" />
    and the resulting log output is

    23 May 2013 19:09:47,974 [      main] INFO - Adding status code directive[status=500; body=
    generating a 500 error with this code in a JSP

    response.sendError(Integer.parseInt(request.getParameter("code")), "If you are seeing this message, no handler for this HTTP response code has been configured in tc Server.");
    simply prints the URI rather than fetching it. I selectively enabled all logging for class org.apache.catalina.valves.AccessLogValve and it seems only to emit INFO level logging. Has anyone else gotten this thing to work or is it just broken?

  • #2

    The URI is only a file:// uri not a http:// uri as the doc example says. You will need to point to the html as it is located in your instance or somewhere on the machine you are running the tc Server instance. i.e. file://${catalina.base}/conf/errors/1/html/500.html



    • #3
      The example shows a file:// scheme in use true but the documentation does not specify the limitation. A URI by definition supports a variety of schemes. Is the source code for ve available somewhere that I could extend it to handle URIs with schemes other than file://? Thanks!


      • #4
        I agree it is not clear. 1) docs will be updated and 2) I can create an enhancement request for that change.