LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 02-17-2012, 04:27 AM   #1
Felipe
Member
 
Registered: Oct 2006
Posts: 294

Rep: Reputation: 31
Tomcat: How can change root context and extracted files?


Hallo:

I'm beginning with the use of tomcat5/6.

Suppossing I've this:

/applications/aplication1/staticdata
/applications/aplication1/web
/applications/aplication1/web/index.html
/applications/aplication1/web/WEB-INF/web.xml
....
/opt/tomcat6/

Supponse I have a "appli1.war" for deploying.

Two questions:
1 - How can I configure Tomcat for the .war to be put in
/opt/tomcat6/webapps/
but undeploy it to
/applications/application1/web (instead of /opt/tomcat6/webapps/appli1/)

2 - How can I configure Tomcat to change root context for that application so instead of accesing with:
http://server.domain/appli1/
acces with a different root context.
Ex:
http://server.domain/application1/
or
http://server.domain/applications/appli1/
or
http://server.domain/Appli1/
(really only need one accessing way, but can change depending of the application).



Regards

Last edited by Felipe; 02-17-2012 at 05:06 AM.
 
Old 02-19-2012, 06:14 PM   #2
Felipe
Member
 
Registered: Oct 2006
Posts: 294

Original Poster
Rep: Reputation: 31
Reading documentation, I've found a simple way.

If may application is extracted in /applications/application1/web and I want my root context as /applications/Appli1/, there is to create a file in conf/Catalina/localhost/applications#Appli1.xml (replace each / with # and suppress first) with:
<?xml version="1.0" encoding="UTF-8"?>
<Context
docBase="/applications/application1/web"
crossContext="false"
reloadable="true" >
</Context>
 
  


Reply

Tags
tomcat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Associate a Tomcat context to a domain name pmorin Linux - Server 2 06-21-2011 03:47 AM
include file name to extracted files miss_dodi Linux - Newbie 13 04-29-2011 05:44 PM
What happens if files are extracted and installed in wrong directory? gogoskiracer Linux - Newbie 4 02-03-2009 01:03 PM
Run CBT extracted from .rar files linuxqu Linux - Newbie 6 01-15-2008 05:31 AM
Change the root Dir in apache-tomcat shan_nathan Linux - Server 0 09-21-2007 11:09 AM


All times are GMT -5. The time now is 09:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration