I would greatly appreciate if you could assist with the following problem:
JBoss3.0.0 (has Jetty 4.0.1 embedded):
In Jetty 4.0.1 in order to serve static pages from the specified directory jboss-service.xml file that lives in [JBossHome]\server\default\deploy\jetty-plugin.sar\META-INF was included the following piece of xml code:
Therefore, when running JBoss3.0.0 (that has Jetty 4.0.1 web server embedded) on a local machine the call to http://localhost would take the user to index.html that was located in C:\wwwRoot
JBoss3.0.4 (has Jetty 4.1 embedded called jbossweb):
We have tried to do exactly the same for JBoss3.0.4 that has jbossweb web server embedded. In fact jbossweb is a Jetty 4.1
We have modified jboss-service.xml file that lives in [JBossHome]\server\default\deploy\jbossweb.sar\META-INF to include the following piece of xml code:
However, when JBoss3.0.4 is started the following error is thrown while trying to fire up jbossweb:
10:23:10,469 INFO [jbossweb] Checking Resource aliases
10:23:10,469 ERROR [jbossweb] problem configuring Jetty:
java.lang.NoSuchMethodException: class org.mortbay.jetty.servlet.ServletHttpContext.setServingResources(class java.lang.String)
After analysing this error we have decided to comment TRUE line in jboss-service.xml.
No errors were thrown. However, when tried to access http://localhost the following error was thrown:
HTTP ERROR: 404 / Not Found
We would greatly appreciate if you could let us know how to set up jbossweb(Jetty 4.1) to serve static pages.
Thank you very much for your time and assistance on this matter.
You can just deploy a war file with no WEB-INF directory.
But if you really want your own context, the setServingResources(true) call needs to be replaced with
or the XML equivalent.