Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: Trunk
    • Component/s: framework
    • Labels:
    • Environment:

      Ubuntu

      Description

      I see Tomcat 7 give me a confusing about adding multiple aliases (virtual hosts) to a webapp. I am not sure if it a bug of Tomcat 7 because it cannot work if I add multiple virtual hosts to a webapp. It works for only the top (first) virtual host. For example:

      <webapp name="ecommerce"
      title="eCommerce"
      server="default-server"
      location="webapp/ecommerce"
      mount-point="/ecommerce"
      app-bar-display="false">
      <virtual-host host-name="localhost1"/>
      <virtual-host host-name="localhost2"/>
      </webapp>

      It will work only localhost1, localhost2 will not work. This is a log I got:

      Nov 18, 2011 5:45:32 PM org.apache.coyote.http11.AbstractHttp11Processor process
      SEVERE: Error processing request
      java.lang.ClassCastException: org.apache.tomcat.util.http.mapper.Mapper$Host cannot be cast to org.apache.catalina.Host
      at org.apache.catalina.connector.Request.getHost(Request.java:631)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:105)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)

      Any idea?

      Regards,
      Chatree Srichart

        Activity

        Chatree Srichart created issue -
        Chatree Srichart made changes -
        Field Original Value New Value
        Attachment multiple_aliases.patch [ 12504715 ]
        Hans Bakker made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Hans Bakker [ hansbak ]
        Fix Version/s SVN trunk [ 12311928 ]
        Resolution Fixed [ 1 ]
        Jacques Le Roux made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Hans Bakker
            Reporter:
            Chatree Srichart
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4m
              4m
              Remaining:
              Remaining Estimate - 4m
              4m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development