File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Serving static pages with Apache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Serving static pages with Apache" Watch "Serving static pages with Apache" New topic

Serving static pages with Apache

jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
I have installed Apache on my desktop. I want to serve static content using this Apache server. Where do I place static web pages ? Do I put these pages in some directory in apache ? If yes, which directory ?

If I put the web pages in any directory in my desktop, how will the Apache map to these web pages, when request comes in for any of these files ?

ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi Jignesh,

You need to create a directory in C:/jakarta-tomcat-4-1-24/webapps/ or locate tomcat under program files.

1) Create a directory for example. C:/jakarta-tomcat-4-1-24/webapps/Books
2) Create or copy paste your index.html file (you need atleast one index file in there)
3) restart tomcat
4) open internet explorer -> type http://localhost:8080/Books

tats it.....


Ujjwal B Soni

<baroda, gujarat, india>

Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
I agree. Here's the link:
subject: Serving static pages with Apache
It's not a secret anymore!