• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to set context root of an application in JBoss?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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 ]
 
Marshal
Posts: 67418
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Rob Jon
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
Marshal
Posts: 67418
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Thanks Peter. Your information is valuable.
 
    Bookmark Topic Watch Topic
  • New Topic