If you have a war file named fibo.war, then your url will access that war file (and the welcome page defined in the web.xml).
If you have a war filke named fibonacci.war, and want to use your url, then add a jboss-web.xml file to the WEB-INF directory. It should contain:
<?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>/fibo</context-root> </jboss-web>
Oh, and the fibonacci.war file is located in the server/default/deploy directory.
hi Peter ,let me explain
the application name is FiboApp.ear and it contains FiboEJB.jar and FiboWeb.war - the META-INF of FiboApp.ear contains the application.xml file where there is a mapping from /fibo to FiboWeb.war
this means that once that server comes to this application.xml file it will know what to do next.
but my point is if i type http://localhost:8080/fibo how does the webserver know that it needs look inside the FiboApp.ear - what happens if i have say FiboApp2.ear , FiboApp3.ear and so on in my ...server/default/all directory ?
sorry i meant ...server/default/deploy directory :)
It doesn't matter what you call the ear file. The server maintains an internal list of the contexts and simply goes to the correct war. When you deploy an ear file, it takes it apart and deploys its contents, and thus updates its internal tables.