• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to set context root of an application in JBoss?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys! i need help in addressing issues in a website, which use STRUTS/servlets etc.

My problem is I get duplicate domain while getting into the website e.g www.abc.com/abc.com/view/login.do.

i want to get rid of 2nd abc.com which i believe is root war location.

i have a web.xml and using filter to strip abc.com but its not working.

any body has any idea or went thru same experience.

thanks in advance.

[Edited by Jaikiran : Changed the subject, to be more meaningful]
[ May 23, 2008: Message edited by: Jaikiran Pai ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you really feel that "Struts Technology" is a good subject for your question?

If you are trying to remove the context path from the URL displayed from the browser, you are going to be disappointed. There is no way to do this in a filter or otherwise.

If you don't want your web app to have a visible context path, you must make the web app the ROOT web app (which has a context path of /).
 
Rob Jon
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response and apologize for odd subject.

Can you please explain how can i make context path to root(\)?

thanks in advance.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What container are you using?
 
Rob Jon
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we are using JBOSS
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this configuration is container specific, I'm going to move this thread to our JBoss forum for you.

-ben
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To change the context for a web app on JBossAS, add a WEB-INF/jboss-web.xml file to your WAR file:

<jboss-web>
<context-root>/</context-root>
</jboss-web>

You will also want to remove the root application - server/default/deploy/jboss-web.deploy/ROOT.war (in 4.2.x).
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rob Jon:
Thanks for your response and apologize for odd subject.


No need to apologize. But I'd change it to something more appropriate were I you.
 
Rob Jon
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanxs Peter and bear. It was wonderful experience as a first time user.
 
Rob Jon
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have another problem. The server where we hosted our website has multiple war files or other sites uploaded.

according to our previous discussion if we update jboss-web.xml file with context-root; will it affect other sites?

please let me know. thnax in advance.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Changing jboss-web.xml affects only the web application (war file) in which is appears.
 
Rob Jon
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter. Your information is valuable.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic