[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

changing default directory for servlets in tomcat

Asked by joachimc in Application Servers

Tags: default, tomcat, directory, change, servlet

Hi guys

I have a huge problem getting tomcat to serve servlets from another directory than the default.

Tomcat 5.5.17, apache 2.0.54 using mod_proxy

Currently it serves .jsp from the directory /home/lennart/www/blog/test without any problems
What I am trying to accomplish is to serve a servlet from /home/lennart/www/blog/test/WEB-INF/classes/HelloWorldExample

the testpage can be reached at megahooked.com/test/test.jsp

Code from the page <jsp:include page="HelloWorldExample" flush="true" />

One interesting thing is that if I uncommect the web.xml part below it will stot serving jsp files.

Relevant entries in the config files
httpd.conf
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    ServerName megahooked.com
    DocumentRoot /home/lennart/www/blog
    ErrorLog /home/lennart/www/error.log

#Reverse Proxy

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /jsp-examples http://localhost:8081/jsp-examples
ProxyPassReverse /jsp-examples http://localhost:8081/jsp-examples

ProxyPass /test http://localhost:8081/test
ProxyPassReverse /test http://localhost:8081/test

server.xml
<Connector port="8081"
            proxyName="megahooked.com"
            proxyPort="80" />

    <!--
    <Context path="/test" docBase="" debug="0"
            reloadable="true" />
    -->

web.xml
<!--
   <servlet>
        <servlet-name>HelloWorldExample</servlet-name>
        <servlet-class>HelloWorldExample</servlet-class>
         <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>HelloWorldExample</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

    -->

Thanks
Joachim

 
Related Solutions
Keywords: changing default directory for servlets …
 
Loading Advertisement...
 
[+][-]04/23/06 10:51 AM, ID: 16519978Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Application Servers
Tags: default, tomcat, directory, change, servlet
Sign Up Now!
Solution Provided By: sleep_furiously
Participating Experts: 2
Solution Grade: A
 
[+][-]04/23/06 10:33 AM, ID: 16519917Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/17/06 03:36 PM, ID: 16704458Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92