Re: [jboss-as7-dev] how to set context path in jboss AS 7
by weiqigao@gmail.com
Hi jboss-as-7-dev (and wildfly-dev),
I signed up to the mailing lists to follow up on a post made on Fri Apr 20 05:13:56 EDT 2012 by Tom Fonteyne (tom.fonteyne at redhat.com):
http://lists.jboss.org/pipermail/jboss-as7-dev/2012-April/005870.html
> you'll need to do this on a per application basis now :(
>
> On 04/19/2012 07:44 PM, M. Steven wrote:
> >Hi,
> >>I am working on migrating an app from jboss 4.2 to 7.1.x. We used to
> > >map our static files using server.xml under jboss-web.deployer.
> > >Doing something like:
> > ><Context path="/photo" docBase="c:/test/images" reloadable="true"
> > >override="true">
> > ></Context>
> >>within server.xml.
> >>Now I can not figure out how to do it within Jboss AS 7. Can someone
> > >please help me on the issue?
> >>Thanks in advance.
> >>Regards,
> >>Mike
> --
> Tom Fonteyne
> Red Hat - UK
> EMEA GSS-SEG-Middleware
I have a client that is dealing with the same JBoss 4.2.x to JBoss 7.1.x migration issue, and I would appreciate it if a pointer can be given as to *How* to do this on a per application basis in JBoss AS 7.1.x. Similar questions on the JBoss.org forums and on StackOverflow are either Not Answered or provide answers that does not address exactly the same problem.
The desired result is to have JBoss AS 7.1.x installed in one location on a host my-host, say, in /opt/appservers/jboss-as-7.1.x, and store some static web files (HTML files, images, and some such) in another location on the same host, say, in /var/myapp/{foo.html,picture.png, etc.}, and have JBoss configured so that the static files can be accessed through the JBoss AS 7.1.x instance at some URL, say, http://my-host:8080/photo/{foo.html,picture.png, etc.} .
My current understanding of the situation is that the configuration/static-resources element in subsystem:web section of the standalone.xml (or domain.xml) file is used to control how static resources are handled within all deployed webapps. But that applies only to the static resources that are part of the deployment (things that’s in the *.war file or exploded directory).
Is there an easy way to achieve what I wanted with JBoss AS 7.1.x configuration?
This issue constitutes lost functionality from an earlier version of JBoss to JBoss AS 7.1.x. Is the elimination of the functionality intentional or merely a side effect of the changing configuration mechanism? Is it the case that the underlying web container, (JBoss Web 7.0.14 I believe), still supports this functionality? If so, are there plans to expose this functionality through some new element in the JBoss AS 7.1.x configuration files?
How will WildFly behave with regard to this scenario?
Regards,
--
Weiqi Gao
weiqigao(a)gmail.com
http://weiqigao.blogspot.com/
11 years, 1 month