Мое приложение отлично работает на jboss-4.x, но теперь мне нужно обновить его на jboss-6.0.0.Final.
Но что делать, если я хочу подавать статический контент из каталога, внешнего по отношению к веб-приложениям.
Так же, как до jboss-5.x, я добавлял элемент «Context» к элементу Host в серверном файле «server.xml». Просто как =>
<Host name="localhost" ...>
> <!-- ADD static benchmark DIRECTORY
> --> Context path="/benchmark" appBase=""
> docBase="/home/anil/benchmark"
> debug="99" reloadable="true">
> /Context>
Но при добавлении того же элемента контекста в C:\jboss-6.0.0.Final\server\default\deploy\jbossweb.sar\server.xml
jboss-6.0.0.Final я получаю следующую ошибку: ->
DEPLOYMENTS IN ERROR:
Deployment "WebServer" is in error due to the following reason(s): **ERROR**, org.jboss.xb.binding.JBossXBRuntimeException: Context not found as a child of Host in unordered_sequence: Listener* Valve* Alias* Realm? attributes?
Deployment "jboss.web:service=WebServer" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.web:service=WebServer' **
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final]
at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
Это означает, что элемент контекста не может быть добавлен сюда.
Хотя я также пытался реализовать это на C:\jboss-6.0.0.Final\server\default\deploy\jbossweb.sar\context.xml
, но все тщетно.