I'm facing the same problem, does anyone have a solution?
Gee, I have this issue too... Theoretically, I could use Apache as a front-end (but I'd like to avoid administration of yet another piece of server software), or we could write a servlet that serves files from a directory (kind of surprised this doesn't already exist). Or did you find a better solution?
Did you guy have a solution to this? I have the same problem.
Add a context to the host by modifying the server.xml of your server as explained below. I simply tried out the configuration for the standalone Tomcat and it worked. The difference may be that with Jboss, the path is relative to the root of the server instance. Enjoy !
<Host name="localhost" autoDeploy="false" deployOnStartup="false" deployXML="false" configClass="org.jboss.web.tomcat.security.config.JBossContextConfig" > ...... <Valve className="org.jboss.web.tomcat.tc5.jca.CachedConnectionValve" cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" transactionManagerObjectName="jboss:service=TransactionManager" /> ...... <!-- Create your 'images' directory at the root of your server instance (ex. default) then insert the following line. Restart your server, you can browse the context via http://yourserver:port/images. --> <Context path="/images" docBase="images" debug="0" reloadable="true"/> </Host>
I'm attempting to do roughly the same thing (specify a specific folder to be served by JBoss) under JBoss 4.2.0, using the "all" configuration (which I've renamed to "default") and am not having much luck.
I've added the the following context line to my server\default\deploy\jboss-web.deployer\server.xml file:
... <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve" cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" transactionManagerObjectName="jboss:service=TransactionManager" /> <Context path="/test" docBase="test" debug="0" reloadable="true"/> </Host> </Engine> </Service> </Server>
After that, and with server stop/starts between each step, I've tried creating populated "test" folders in both
but in neither case was I able I access http://localhost:8080/test
I've also tried specifying full paths for the "docBase" tag, but that didn't do the trick either.
...has anyone had this working within JBoss, rather than a stand-alone Tomcat install like kindor tested? If so, what did you do to get it to work?
Thanks in advance,
virtual directories (in weblogic) is different than context path..
requestdispatcher forward to another jsp page in virtual directory will not work in jboss, unless you add symbolic link (because it is in a different context)
I have configured the things in server.xml and it is able to serve;
My problem with application is: My application places some dynamic data in the docBase like some .doc files; after application places such file, through apache webdav support I edit .doc file for modifications;
When I try to save the modified content , its not updating in the docBase location; instead it is creating a new .doc file in apache root folder;
Please help as I need to configure to host my application at client location.