3 Replies Latest reply on Aug 14, 2003 11:35 AM by Michael Dinsmore

    Jetty Virtual Setup Help Requested

    bobbyblix Newbie

      This is on a site with a multiple pages. I only want a few pages from that site to ALSO be accessed by their own subdomain names. For example & ideally, if you went to http://hobbies.mynames.com , it would fetch the same page/file as if you went to http://www.myname.com/hobbies/index.jsp . Is this possible & how can I do this?

        • 1. Re: Jetty Virtual Setup Help Requested
          Jeroen Jansen Newbie

          Sure it is possible. My guess what you're talking about is request dispatching. You coulduse a servlet that uses the RequestDispatcher to forward a given request to another given context/JSP. If you use jetty, you can deploy a WAR and specify in that WAR what virtual host names it should map to.
          Boom. There you go.

          • 2. Re: Jetty Virtual Setup Help Requested
            Michael Dinsmore Newbie

            My guess is really that he's talking about his jboss-web.xml file. We had one like:

            <?xml version="1.0"?>
            <jboss-web>
            <virtual-host>foo.bar.xyz</virtual-host>
            <virtual-host>goo.bar.xyz</virtual-host>
            <context-root>/</context-root>
            </jboss-web>

            which worked in JBoss-3.0.4 with Jetty but not in JBoss-3.2.1 with Jetty.

            Any ideas?

            • 3. Re: Jetty Virtual Setup Help Requested
              Michael Dinsmore Newbie

              Maybe I should have added the error, which might be useful as well.

              12:42:14,993 WARN [JettyService] Failed to parse descriptors for war(file:/C:/Java/jboss-3.2.1/server/passkey/tmp/deploy/server/passkey/deploy/ResDesk.war/38.ResDesk.war)
              org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: expected only one virtual-host tag)
              at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:877)
              at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:355)
              ... edited out for clarity...

              Thanks!