This doesn't seem possible - it is planned for implementation?
R u able to solve the problem of virtual directory then pls let me know
I too would like to have this feature
If someone got any idea how to accomplish virtual directory settings, please let me know too... I am searching and searching but still no luck. The only solutions currently available are:
1) use a servlet to serve files
2) use Apache at the front with an alias to the virtual directory.
Why can't JBoss add this functionality too? Anyway i someone does come across an idea do tell.
Thanks in advance,
What I have done is simply creating a virtualdir.war in the deploy directory and put my files in there. Then you can access it with /virtualdir context. It is not really like a virtual directory, but it is very close. Instead of virtualdir you can use whatever path you like and with unix symlink you can do nice things....
If you are using the JBoss/Jetty configuration, you can do this by changing the Jetty configuration. See
This is all you have to do:
create following jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
It's essential that context-root is specified if you already have a default context mapped to another web application in current container.
In jboss 3.2.3 you can have the virtual directory. But I think 3.2.3 have many bugs, so if you want use in 3.x or 4.x, you can just copy the code in 3.2.3 into you 3.x compile and replace the tomcat41-service.jar, then you can set your virtual path.
Code in org.jboss.web.catalina.ConfigHandler.
I mean 3.0.x or 4.0.x cannot have the virtual directory.right?