Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Access static file from apache to tomcat web applications

User_19BPUMar 19 2013 — edited Mar 19 2013
Hi,

I know that this is a Java forum, but still yiu guys can help me as I didn't got any answer in Apache forum. Hence please apologize.

I have my static files loaded in c:/apache/htdocs, I need to access that in my web application running in tomcat server.
For example

In c:/apache/htdocs, i have an images folder with static images which I am accessing in my web application

images
1.gif
2.jpg

In my web application i am accessing like
images/1.gif

But using the above I am unable to access the image from the Apache. Whether we need to integrate Apache & tomcat using
mod_jk, what are the other configuration we need to provide for this work?

In httpd.config I have added the below:-


<VirtualHost <IP address>:80>
DocumentRoot "c:/apache/htdocs"
/VirtualHost>

In tomcat web application I am accessing like:-
images/1.gif

When access the 1.gif in my webapplication that image is not displayed? Is there any other config I need to do in apache web server?

Thanks.

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 16 2013
Added on Mar 19 2013
1 comment
336 views