aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "context path setting in jboss" Watch "context path setting in jboss" New topic
Author

context path setting in jboss

hamlin stephen
Ranch Hand

Joined: Dec 11, 2003
Posts: 45
Hi,
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
http://<<ipname>>/application
it will show page not found
but when i am giving with / like.
http://<<ipname>>/application/
it showing welcome page of my application.
please give a solution..
Chiaw Huat Lee
Greenhorn

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

<application>
<display-name>xXx</display-name>
<module>
<web>
<web-uri>xXx.war</web-uri>
<context-root>/xxx</context-root>
</web>
</module>
</application>

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.
<web-app>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
</web-app>
---------------------------------------------------------------------------
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 folder.so where i need to put the application.xml
My directory structure is

myapplication
WEB-INF
src
packagename
web.xml
struts-config.xml
thank you..
Chiaw Huat Lee
Greenhorn

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: http://aspose.com/file-tools
 
subject: context path setting in jboss