Solved

How to place html and jsps on Apache instead of in tomcat directory?

Posted on 2001-09-05
7
164 Views
Last Modified: 2010-03-04
Is there a way of getting jsp pages to be able to sit
anywhere on a web server, rather than just under the proxy tomcat webapp
directorys?

What ever the solution for that is probably the same for .xml files,
which
I would like to be able to place anywhere example /net/www/cocoon but it
seems like tomcat isnt going to let me do that...

Any ideas...?


Basically I need the be able to sit
xml and jsp files outside of the tomcat document root.  Is this
a) possible and b) implementable?  
I've done a bit of poking around, Do I need to modify the server.xml file for tomcat (.tomcat/conf/server.xml).
 There is a <context> tag
(eg.
<Context path="/examples"
        docBase="webapps/examples"
        crossContext="false"
        debug="0"
        reloadable="true" >
</Context>
) in the server.xml.  Hoew to figure out how to get this to
point to directories outside of the doc root that apache accepts.  Do I need to modify the doc root
for apache also (httpd.conf).  

Hope this helps.

Awaiting suggestions .........?
0
Comment
Question by:sdesar
  • 4
  • 3
7 Comments
 

Author Comment

by:sdesar
Comment Utility
Basically, to clarify.... I  want to put all the jsps outside of apache ie /usr/local/apache... into maybe /net/www/examples..... is this possible?  What *.conf and *.xml files do I need to change?
0
 
LVL 1

Expert Comment

by:fauzdar
Comment Utility
see tomcat looks in  the server.xml file for the document root same like apache looks in httpd.conf..

you are on the correct path. you need to change the docBase to whatever directory you want to put the jsp pages to.
the contextpath is what is looked in the url, if the '/exampes' exist then  the server is told that the dictory for this url directory is "webapps/examples". insted of that you can define your own contextpath and docbase in the server.xml and put the web.xml in the directory you created... will work :)
0
 
LVL 1

Expert Comment

by:fauzdar
Comment Utility
change the docBase to " /net/www/cocoon"
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

Author Comment

by:sdesar
Comment Utility
what about if I want to put the cocoon/hello.xml files in /net/www/cocoon. What files should I modify?... for the *.jsp.... I only had to modify the server.xml file that is under tomcat.
0
 
LVL 1

Accepted Solution

by:
fauzdar earned 50 total points
Comment Utility
i have not worked with xml file... as for jsp yes just the server.xml change will work. i guess it should work.
0
 

Author Comment

by:sdesar
Comment Utility
The xml files are not working...
Does anyone else have any suggestions to make the hello.xml work.

Thanks for yoiu responses!
0
 

Author Comment

by:sdesar
Comment Utility
Thanks... here's your points..
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now