Please post the changes you made to server.xml. Also, please indicate where you made those changes (including some of the tags before before and after your changes should be sufficient).
I am pretty certain this was working in CR2, at least I think that is the last time I tried it. I haven't tried GA yet.
Anyone have a fix for this? I have the same problem. Here's my server.xml config:
<Host name="localhost"> <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve" cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" transactionManagerObjectName="jboss:service=TransactionManager" /> <Context path="/dev" docBase="/programs/myDev" reloadable="true"/> </Host>
This config worked on at least 4.0.5 and 4.2.2 . I searched the release notes and the jboss 5 docs and I see nothing about this change. Please help.
I went back and tried this on various releases. The results:
5.0.0.CR1 & CR2: does not work
5.0.0.GA: generates this error:
11:48:18,994 ERROR [AbstractKernelController] Error installing to Start: name=WebServer state=Create org.jboss.xb.binding.JBossXBException: Failed to parse source: Context not found as a child of Host at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203) at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:183) at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:133) at org.jboss.web.tomcat.service.deployers.TomcatService.startService(TomcatService.java:171) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376) ...
I would open a JIRA issue, but for some reason I do not have update access to JIRA...
BTW, as a workaround I looked at the context.xml file, as that seems to now be the preferred way to add a Context in tomcat. However, the jbossweb.sar/context.xml is seeming global, and only allows one Context defined. I need to add four contexts. Anyone know how to do userland context.xml files in jboss 5? I looked in the jboss docs and I couldn't find the equivalent as explained in the tomcat docs.
I'm using JBoss 5.0.0.GA with JDK 6.
I expand the war file in the deploy directory. I then create a symbolic link in the expanded directory. It looks like JBoss does not follow the symbolic link and there is not "Context path" like in JBoss 4 where "allowLinking=true" could be set.
Did you manage to get JBoss 5 web server to access static content in the file system ?
I have exactly the same problem that you are mentioning in this topics and
I did not found any solution for the moment.
Thanks in advance
According to the JIRA, this feature has been dropped (the JIRA was rejected). The only option you have is to add a new deploy directory in profile-service.xml. Of course, doing so means that you will have to rename the directory that contains the static content to xxx.war.
Was there ever a solution posted for this? I am also having the problem - "Context not found as a child of Host".
If you are running Windows, and have little control over where your content lives, a symlink can ease your pain.
Static content is placed here, and here only by a third-party application with no configuration options:
%CONTENT_HOME% = d:\inflexible-corp\inflexible-app\output\images
create a dummy WEB-INF directory with a web.xml
and a jboss-web.xml, and copy it to %CONTENT_HOME%
<jboss-web> <context-root>/staticimages</context-root> </jboss-web>
in a command prompt:
d: cd %JBOSS_HOME%\server\all\deploy mklink /D staticimages.war %CONTENT_HOME%
Boot JBoss. Your fake war will deploy nicely.
Note that most programs are not aware of symlinks and will delete the contents of %CONTENT_HOME% if turned loose on the symlink. For example, deleting %JBOSS_HOME% on a development box with Ant's <delete> task will clean out %CONTENT_HOME%, which I expect is NOT what you desire. As an aside, I tried this prior to actually symlinking to the directory with the valuable content, so I got off easy.
This works with UNC paths also.
mklink /D staticimages.war \\networkserver\dir1\images
Why on earth would a product manager consider it reasonable to remove a long-standing and well-used feature from a product? As the primary JBoss integrator on my DoD project, I feel like I'm beginning to spend more time working against JBoss and JBossESB than I am working with it.
Message was edited by: Ryan Hochstetler. Changed slashes to backslashes. I use a Mac at home, Cygwin at work, and am in the habit of using unix-style directory separators.