aspose file tools
The moose likes JBoss and the fly likes Deploying static content on JBoss 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "Deploying static content on JBoss 7" Watch "Deploying static content on JBoss 7" New topic
Author

Deploying static content on JBoss 7

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 434
Hi,

I'm using JBoss 7.1.0.AS. I have a simple directory consisting of a bunch of static files. Is there a way I can copy this directory somewhere on my JBoss server and have the files served? I tried copying my directory (named "test") into the root web folder where other Java WAR files are located, but sadly, when I visit http://localhost/test/example.jpg (an example file I have), I get a 404.

Grateful for any pointers in the right direction, - Dave
Greg Charles
Bartender

Joined: Oct 01, 2001
Posts: 2542
    
  10

You can put them in the root folder of any of your web apps (war files) just like you do with JSP or JSF, or whatever page format you use. You can also put them in the welcome-content folder, as long as you haven't disabled that in your configuration. Your config file (e.g. standalone.xml) should have: in the server definition.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Deploying static content on JBoss 7
 
Similar Threads
EJB3.0 on JBOSS 5.0 Deployment problem
how to make use of deployment ment directory other than Default directory in jboss
Jboss and Apache to gather
Cannot find the symbol
JBoss virtual directory in jboss 5.0.1