my dog learned polymorphism
The moose likes Tomcat and the fly likes Serving static pages with Apache Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Serving static pages with Apache" Watch "Serving static pages with Apache" New topic
Author

Serving static pages with Apache

jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 147
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 ?

thanks
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 390
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.....

Cheers!!!

Ujjwal B Soni

<baroda, gujarat, india>
<919998971048>


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Serving static pages with Apache
 
Similar Threads
Size of documents Apache can handle
how to display an image in a jsp through ajax
How to change Webapps directory
Tomcat alone vs Apache/Tomcat
Calling Java classes from JSP page