LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 03:27 AM   #1
Felipe
Member
 
Registered: Oct 2006
Posts: 302

Rep: Reputation: 32
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 04:06 AM.
 
Old 02-19-2012, 05:14 PM   #2
Felipe
Member
 
Registered: Oct 2006
Posts: 302

Original Poster
Rep: Reputation: 32
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



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 02:47 AM
include file name to extracted files miss_dodi Linux - Newbie 13 04-29-2011 04:44 PM
What happens if files are extracted and installed in wrong directory? gogoskiracer Linux - Newbie 4 02-03-2009 12:03 PM
Run CBT extracted from .rar files linuxqu Linux - Newbie 6 01-15-2008 04:31 AM
Change the root Dir in apache-tomcat shan_nathan Linux - Server 0 09-21-2007 10:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:51 AM.

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
Open Source Consulting | Domain Registration