LinuxQuestions.org
Help answer threads with 0 replies.
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 01-25-2012, 05:00 AM   #1
adam_1784
Member
 
Registered: Dec 2011
Posts: 41

Rep: Reputation: Disabled
Tomcat on linux


It is possible to run jsp file from some other directory not from webapps dir?
 
Old 01-25-2012, 07:20 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Yes. You should add something like:
Code:
<Context path="/my-webapp"
  docBase="/path/to/my-webapp"
   reloadable="true">
</Context>
before the closing </Host> in server.xml. And you have to restart tomcat

Regards
 
Old 01-25-2012, 07:58 AM   #3
adam_1784
Member
 
Registered: Dec 2011
Posts: 41

Original Poster
Rep: Reputation: Disabled
Yes i try this but it does not work actually i want my tomcat to integrate with apache so i add jkmount in vhost file.
When i add <context> part in server.xml and then i restart tomcat and i visit the link 'myip:8080' it does not show the tomcat page it is due to because i change in docBase="my path".
 
Old 01-25-2012, 08:43 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You didn't say anything about apache and mod_jk in your 1st post. What I've posted above is to be used by tomcat standalone. I.e. to visit your webapp you need to use: http://tomcat:8080/my-webapp.
Anyway if you changed the context path in tomcat, like in my previous post, then it should work too, using the url: http://apache/my-webapp. Of course your mod_jk setup should already be working.

Last edited by bathory; 01-25-2012 at 03:26 PM.
 
  


Reply



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
Session replication using apache+mod_jk+tomcat(5.5.28-veriosn of tomcat) sreejithp Linux - Server 1 12-24-2010 06:46 AM
Tomcat 6.0 on Linux, after modifying tomcat-users.xml still cannot login. cuian01 Linux - Newbie 1 01-28-2010 03:45 AM
fresh tomcat 5.5 install not showing tomcat homepage laggerific Linux - Software 0 10-26-2007 03:28 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM

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

All times are GMT -5. The time now is 01:53 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