-
1. Re: JBoss/Jetty FAQ...
joelvogt Jul 9, 2002 10:53 PM (in response to jules)I just had a read through and found this section interesting:
*quote*
I want to serve content from outside a war
-------------------------------------------------
To serve external content, you can step outside the J2EE way of doing
things and use Jetty's proprietary configuration mechanism to tell it
to serve pages from anywhere on your disc.
Add something like this to the ConfigurationElement in
jbossweb.sar/META-INF/jboss-service.xml, to serve static pages:
/documents/*
/docroot/
TRUE
This example maps the context /documents to the directory /docroot, so
to retrieve e.g. /docroot/myfile.html you would hit
http://localhost:8080/documents/myfile.html.
*quote*
This is all well and good, does anyone know how to do this using tomcat/catalina? -
2. Re: JBoss/Jetty FAQ...
coughlam Jul 11, 2002 7:16 AM (in response to jules)Hi,
I tried your suggestion by placing the "Call" tags below in the xml file. However, when I done this I got a SaxParseException:
--- Start Exception
11:22:06,688 WARN [Jetty] WARNING: ERROR@null line:2 col:-1 : org.xml.sax.SAXParseException: Root element type is "Call", but was declared to be "Configure".
11:22:06,698 ERROR [Jetty] problem configuring Jetty:
org.xml.sax.SAXParseException: Root element type is "Call", but was declared to be "Configure".
at org.apache.crimson.parser.Parser2.error(Parser2.java:3086)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1325)
--- End Exception
My JBoss service xml document's ConfigurationElement section looks like this:
/monitoring/*
f:/monitoring/
TRUE
etc......................
Any suggestions ??
Thanks in advance,
Mick -
3. Re: JBoss/Jetty FAQ...
coughlam Jul 11, 2002 8:11 AM (in response to jules)It's OK, I got it working,it was my own fault.
Thanks !
Mick -
4. Re: JBoss/Jetty FAQ...
jules Jul 31, 2002 9:12 PM (in response to jules)It looks like it is time this was posted again.
Jules -
-
6. Re: JBoss/Jetty FAQ...
tcabot Sep 5, 2002 5:06 PM (in response to jules)I think that the "howto change the jetty listener port" topic needs to change slightly. In the jboss distro that I'm currently using (3.0.0 I think) the sar is jetty-plugin.sar (not jbossweb.sar).
Anyway, thanks for the FAQ! -
7. Re: JBoss/Jetty FAQ...
jules Sep 5, 2002 8:50 PM (in response to jules)3.0.0 is pretty out of date - 3.0.2 is out.
I'm afraid I only maintain the FAQ on HEAD - i.e. for the latest version, otherwise my life just gets even more complicated than it already is.
But thanks for the comment.
Jules -
-
9. Re: JBoss/Jetty FAQ...
tsangcn Sep 23, 2002 2:14 AM (in response to jules)Hello Jules,
I have the following comments on the FAQ
Don't delete JSP compilation results...
------------------------------------
The keepgenerated init parameter doesn't help. It only controls the generated Java source files but not the compiled Java classes.
I want to add the following to the FAQ
Where should I put the webdefault.xml
-------------------------------------
The default file is in $JBOSS_HOME/deploy/jbossweb.sar/org.mortbay.jetty.jar/org/mortbay/jetty/servlet/webdefault.xml
But I want to keep it unmodified. I want to keep my modified version somewhere else. But how to specify the location.
Specify it in $JBOSS_HOME/deploy/jbossweb.sar/META-INF/jboss-service.xml
Yes, but how to specified the format.
I have try this
webdefault.xml
The JBoss server's log saying that it cannot find this resource.
It seems that it expect to find the file in the current directory where JBoss is started.
OK, I put it in $JBOSS_HOME/bin. Then I have the following in server.log
DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.web:service=JBossWeb
DEBUG [org.jboss.system.ServiceConfigurator] WebDefault set to webdefault.xml in jboss.web:service=JBossWeb
DEBUG [org.jboss.jetty.JettyService] set WebDefault to webdefault.xml
WARN [org.jboss.jbossweb] Cannot find resource for webdefault.xml: using default
DEBUG [org.jboss.jbossweb] webdefault specification is: file:/C:/jboss8080/bin/./webdefault.xml
Why it still complaint cannot find resource for webdefault.xml, but then it use my webdefault.xml as default.
Something quite contradict.
Then I have try this
META-INF/webdefault.xml
This time, I have the following in server.log
DEBUG [org.jboss.system.ServiceCreator] Created bean: jboss.web:service=JBossWeb
DEBUG [org.jboss.system.ServiceConfigurator] WebDefault set to META-INF/webdefault.xml in jboss.web:service=JBossWeb
DEBUG [org.jboss.jetty.JettyService] set WebDefault to META-INF/webdefault.xml
WARN [org.jboss.jbossweb] Cannot find resource for META-INF/webdefault.xml: using default
DEBUG [org.jboss.jbossweb] webdefault specification is: file:/C:/jboss8080/server/default/deploy/jbossweb.sar/META-INF/./webdefault.xml
This time, it expect it not to relative to $JBOSS_HOME/bin but ..../jbossweb.sar
But it still complaint "Cannot find resource for ..."
So, what is the rule to specify webdefault.xml?
the scratchdir init parameter for JSP
-------------------------------------
If the parameter value is not begin with "/", the directory should be relative to the current directory where JBoss is started
If it start with "/", it is the root directory of the file system.
Thanks
CN -
-
-
12. Re: JBoss/Jetty FAQ...
jules Oct 26, 2002 8:17 PM (in response to jules)I've added a number of new items and expanded some old ones...
Jules -
13. Re: JBoss/Jetty FAQ...
jules Nov 28, 2002 6:23 AM (in response to jules)it's time this was posted again...
-
14. Re: JBoss/Jetty FAQ...
jules Jan 21, 2003 5:01 AM (in response to jules)and again - a few updates...