java:staticminisiteinjboss
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
java:staticminisiteinjboss [2011/05/25 17:13] – creado rlunaro | java:staticminisiteinjboss [2022/12/02 21:02] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How to create a directory to serve only static content in Jboss ====== | ||
+ | ====== For Jboss 7 ====== | ||
+ | |||
+ | Under Jboss 7, things have changed in this issue: Jboss AS 7 enforces the deployment with archive files (.war, .ear and so on) instead of cut-and-paste of the filesystem in the deployment directory. | ||
+ | |||
+ | For achieveing the same goal, the only thing you have to do is: | ||
+ | |||
+ | 1. let's suppose you have a directory called " | ||
+ | |||
+ | < | ||
+ | myApp | ||
+ | | | ||
+ | +--- index.html | ||
+ | | | ||
+ | +--- first.html | ||
+ | | | ||
+ | +--- second.html | ||
+ | </ | ||
+ | |||
+ | 2. you have to select the three elements and select "save as a zip file": then the three files will be saved in a zip file called something like " | ||
+ | 3. rename the file to " | ||
+ | 4. and that's it, you have a war file ready to deploy into your jboss. | ||
+ | |||
+ | **Yes, but I want also to deploy this application as the default application of the server** | ||
+ | |||
+ | You only have to include a jboss-web.xml file with this content: | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | It is probable that many applications would fight for the root position of your web server and this will result in crashes, be careful with this. | ||
+ | |||
+ | http:// | ||
+ | |||
+ | ===== For Jboss 5 and previous releases ===== | ||
+ | |||
+ | Let's say that you want to create a url like http:// | ||
+ | How it is done??? | ||
+ | |||
+ | Here are instructions: | ||
+ | |||
+ | * Create a directory '' | ||
+ | * Under this directory, create a directory '' | ||
+ | * The content of the file '' | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <web-app id=" | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | * And that's it. Start jboss and point a browser to http:// |