Meaningless Drivel is fun!
The moose likes JBoss/WildFly and the fly likes Apache-HTTP server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Apache-HTTP server" Watch "Apache-HTTP server" New topic

Apache-HTTP server

naguri narayanareddy

Joined: Sep 07, 2013
Posts: 5

Hi ,

How apache server serves static related information , Usually we place all html ,css,js related files under web root folder of war or ear. This war or ear we place in app server. In this scenario how apache deals with static content.

Thanks and Regards
Peter Johnson

Joined: May 14, 2008
Posts: 5852

Yes, and no.

Yes: You can always place all content in the web server and have Apache HTTPD redirect all requests to the web server.

No: You can always separate out the static content from the dynamic content and have Apache HTTPD server the static contents and redirect only dynamic content requests to the web server. Note that to do this you must carefully design your HTML pages (both the static ones and the ones generated by your servlets/JSPs/Struts/etc) to use the correct URLs because the static content cannot be accessed via relative paths - you now have to treat the static content as coming from a different web site.

JBoss In Action
I agree. Here's the link:
subject: Apache-HTTP server
jQuery in Action, 3rd edition