1 Reply Latest reply on Sep 16, 2002 3:39 PM by seffenberg

    Using JBoss-Jetty - Feedback

    seffenberg

      After banging my head against the wall I found a workaround. Don't know if it is the real thing (tm), but it works and I haven't found anything better on the web:

      - determine which server you are using, which is "default" by default; the server directory is $JBOSS_HOME/server/default, e.g. C:\jboss-3.0.2\server\default
      - find the file org.mortbay.jetty.jar
      - modify org/mortbay/jetty/servlet/webdefault.xml:

      set "nonContextServlets" to "true" in the
      servlet section, e.g.


      <servlet-name>Invoker</servlet-name>
      <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
      <init-param>
      <param-name>verbose</param-name>
      <param-value>false</param-value>
      </init-param>
      <init-param>
      <param-name>nonContextServlets</param-name>
      <param-value>true</param-value>
      </init-param>
      <init-param>
      <param-name>dynamicParam</param-name>
      <param-value>anyValue</param-value>
      </init-param>
      <load-on-startup>0</load-on-startup>


      - pack the whole thing back together into org.mortbay.jetty.jar and overwrite the existing file

      - restart jboss




      Regarding

      http://www.jboss.org/online-manual/HTML/ch11.html#howto-jetty

      I have some comments

      (1) Section "Start the JBoss-Jetty server suite"
      ------------------------------------------------

      the file names should be run.bat and run.sh; the command line argument "jetty" seems to be ignored, so the lines should read:

      (windows)

      run.bat

      (unix)

      ./run.sh


      (2) Section "Start the JBoss-Jetty server suite"
      ------------------------------------------------

      the urls given in the document did not work on my set:

      http://localhost:8080/jboss/
      http://localhost:8080/
      http://localhost:8080/demo/

      according to $JBOSS_HOME\docs\examples\jbossweb\FAQ this is the default behaviour.


      (3) Configure your JBoss-Jetty installation
      -------------------------------------------

      the jetty configuration file org/mortbay/jetty/servlet/webdefault.xml, part of org.mortbay.jetty.jar is worth mentioning



      (4) JBoss-Jetty troubleshooting tips
      ------------------------------------

      this is a post I made in the jsp forum, but it might be worth to be repeated in the jboss/jetty document as well:


      Workaround for error message "HTTP ERROR 503 Dynamic servlet XXX not loaded from context"


      - determine which server you are using, which is "default" by default; the server directory is $JBOSS_HOME/server/default, e.g. C:\jboss-3.0.2\server\default
      - find the file org.mortbay.jetty.jar
      - modify org/mortbay/jetty/servlet/webdefault.xml:

      set "nonContextServlets" to "true" in the
      servlet section, e.g.


      <servlet-name>Invoker</servlet-name>
      <servlet-class>org.mortbay.jetty.servlet.Invoker</servlet-class>
      <init-param>
      <param-name>verbose</param-name>
      <param-value>false</param-value>
      </init-param>
      <init-param>
      <param-name>nonContextServlets</param-name>
      <param-value>true</param-value>
      </init-param>
      <init-param>
      <param-name>dynamicParam</param-name>
      <param-value>anyValue</param-value>
      </init-param>
      <load-on-startup>0</load-on-startup>


      - pack the whole thing back together into org.mortbay.jetty.jar and overwrite the existing file

      - restart jboss


      (5) FAQ
      -------

      it would be nice to have the HTML document point to the FAQ ($JBOSS_HOME\docs\examples\jbossweb\FAQ) or have both synchronized.