views:

1488

answers:

2

I come from the Open source world where I'm used to having Apache serve up my images, css, javascript, etc., while Tomcat or an app server of its ilk handles all the JEE lifting.

But now I'm doing a project with Weblogic 8.1, and I can't seem to figure out how to get it to work. For example, the concept of a document root. How can I configure this?

+4  A: 

You might want to take a look here and here:

Here's the short version of what BEA says:

Web Applications

HTTP and Web Applications are deployed according to the Servlet 2.3 specification from Sun Microsystems, which describes the use of Web Applications as a standardized way of grouping together the components of a Web-based application. These components include JSP pages, HTTP servlets, and static resources such as HTML pages or image files.

Basically, what I had to do get this type of thing to work was to configure my set of static pages as an application, and deploy it as such. In whatever directory or .war you deploy, you'll need a WEB-INF directory and probably a web.xml file within that points at your static files.

We're running WL 10, but the concept should be the same:

here's snip of our config.xml that we use to serve some static content:

<app-deployment>
    <name>myStaticContentApp</name>
    <target>myAppServer</target>
    <module-type>war</module-type>
    <source-path>myStaticContentDir</source-path>
    <deployment-order>100</deployment-order>
    <security-dd-model>Advanced</security-dd-model>
    <staging-mode>nostage</staging-mode>
  </app-deployment>

And then in the directory "myStaticContentDir" we have the static files and then a WEB-INF directory with this as the web.xml within it:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"&gt;
<web-app>
  <welcome-file-list>
    <welcome-file>myStaticFile.html</welcome-file>
  </welcome-file-list>
</web-app>
Millhouse
A: 

The way I see it done is put the static content on a web server in the DMZ and let it handle all static content such as static HTML pages and images. Only allow the dynamic content requests to be relayed back to WebLogic.

duffymo