File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes context path setting in jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "context path setting in jboss" Watch "context path setting in jboss" New topic

context path setting in jboss

hamlin stephen
Ranch Hand

Joined: Dec 11, 2003
Posts: 45
Of which file we need to edit for setting context
I mean to say that one of my application is deployed and when accessing
it throgh browser like
it will show page not found
but when i am giving with / like.
it showing welcome page of my application.
please give a solution..
Chiaw Huat Lee

Joined: Oct 24, 2004
Posts: 15
If I'm not mistaken, you need to have a file called application.xml in your project/classes/META-INF.


So,if you want your application to be access as http://ip:8080/xxx, then the application.xml will exactly the same as above.Get the idea?Like, for example if I want it to be http://ip:8080/tutorial then my <context-root> will be /tutorial.

The <web-uri> tag will be your war file name.Remember,is case sensitive.
And then, you need to add another web.xml inside your WEB-INF(project/classes/) folder.
Once you done that,zip it up and rename it as .ear file.Then, deploy it.
For your info,jboss will not save the context in any xml file.What it will do is, it will create a tmp folder for your deployed application inside the server/default of your jboss folder.

It is different to Apache Tomcat in which, it allowed you to directly point the context path to your project folder and you can rename the context path directly in their server.xml.

P/s:Sorry for my bad english.Hope this comment will help you.
hamlin stephen
Ranch Hand

Joined: Dec 11, 2003
Posts: 45
Thank you Huat Lee,
But one thing I am deploying the application not in a war file just exploding the where i need to put the application.xml
My directory structure is

thank you..
Chiaw Huat Lee

Joined: Oct 24, 2004
Posts: 15
Hi there,

Can you try to create a folder call META-INF just under your myApplication folder...and then, put the application.xml inside it.

Hope it works...
I agree. Here's the link:
subject: context path setting in jboss
It's not a secret anymore!