Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure a static context path in jboss7?

Tags:

jboss

jboss7.x

I am trying to find a way to configure a static context path i jboss7. We are upgrading from jboss4.2 and in that version we had a config element in server.xml that looked like this:

   <Host name="localhost"
       autoDeploy="false" deployOnStartup="false" deployXML="false"
       configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
       >

        <Context path="/directory/pdf"
                docBase="/tmp/pdfdok"
                reloadable="true">
        </Context>

It was in the directory deploy\jboss-web.deployer.

The intention of this is to be able to reach the directory /tmp/pdfdok with a url like this: http://server:port/directory/pdf or more exactly to reach a generated pdf document on this directory with the url: http://server:port/directory/pdf/pdfdoc.pdf from a client popup window.

Is there someone here who can help me?

Thanks

Rune

like image 765
Runery Avatar asked Nov 14 '22 15:11

Runery


1 Answers

It seems like this is impossible to do in jboss7. I solved my problem by using a fileservlet instead. This is a good page to look at for an example: http://balusc.blogspot.com/2007/07/fileservlet.html

like image 172
Runery Avatar answered Dec 19 '22 15:12

Runery