2 Replies Latest reply on Nov 22, 2002 12:24 PM by McGee

    Mapping a servlet to http://hostname/hello.dll

    McGee Newbie

      Hi all,

      I have an existing client that I have to respond to, and it's trying to connect to URLs of the form http://hostname/hello.dll; that is, there's no webapp name provided. I can do this under plain ol' Tomcat by messing with $TOMCAT_HOME/conf/web/xml, but JBoss seems to do more than just pass URLs through to Tomcat unmolested, and I'm not sure how to do what I want through JBoss.

      Any ideas?

      Thanks,
      McGee

        • 1. Re: Mapping a servlet to http://hostname/hello.dll
          Jason Brome Newbie

          Just make your web application the root application - i.e. under the default context. The standard way to do this is by wrapping the war within an ear. In your ear's application.xml, set a context of / for the war file.

          Then add an entry to your web.xml that maps the context path /hello.dll to your servlet.

          Jason

          • 2. Re: Mapping a servlet to http://hostname/hello.dll
            McGee Newbie

            Thank you Jason. Someone else here did some forum browsing and found a suggestion to simply include a jboss-web.xml in his .WAR file, and put the context-root entry in jboss-web.xml. Unless I'm mistaken, putting it in application.ear as you suggest would be more general and better than using jboss.xml. I'll give this a shot myself.

            Thanks Jason,
            Chris