Serving static content from a directory

Is it possible to configure WebLogic to serve static content (files) from a directory via an HTTP GET?
What I need is similar to the Apache functionality of publishing a directory by mapping a URL (http://weblogic.server.xx/somePrefix) to a directory on the file-system (e.g. /path/to/some/dir) and allow one to:
- list the directory content by visiting the URL
- fetch files by doing an HTTP GET (this would be by clicking on a file in the listing)
Can one do this without adding a separate HTTP server on the same machine as WebLogic?

I believe if you created a WEB-INF directory at that location and added a skeleton web.xml file, you could specify that location when you deployed a new application from the admin console. I believe there should be an option to allow listing the directory contents, perhaps somewhere in the server definition tabs.

Similar Messages

  • Host static content from Weblogic

    I have a need to host static content from my weblogic server in order to mimic the functionality of our old OHS server. In our case we used Apache rewrite rules in our old server that would catch someone trying to access the server directly by URL or trying to come in through HTTP instead of HTTPS and then pull the switch-a-roo on them and direct them directly to our APEX instance over a HTTPS connection. Is there a way to accomplish this same thing with weblogic without an Apache server acting as your front end?
    I found this article here http://blogs.oracle.com/middleware/2010/06/publish_static_content_to_weblogic.html about hosting static content but in my case I need the content actually at the root level (example http://domain.com/index.html) where I can throw in javascript redirect headers.
    The way I set this up was I have two servers on one box. The first server services standard HTTP requests on port 80. It will do nothing but redirect to the corresponding location on the same machine but over HTTPs on port 443.
    The server running on port 443 actually runs the APEX listener. I would like to deploy something similar to the first one that shows its content at https://server.domain.com to redirect to the Apex listener. I thought I might could repackage the apex listener to accomplish this but I would rather do it as a separate deployment rather than risk damaging our modified production copy of the APEX Listener.
    Anyone have any thoughts?

    What about using a virtual host? Create a virtual host and only target your application to that host.
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/taskhelp/virtual_hosts/VirtualHosts.html
    Then within that virtual host, do something like this to force HTTPS:
    http://weblogicserver.blogspot.com/2009/11/force-confidentiality-for-web.html
    Then have an application that catches everything else deployed to the same server for other IP/hostnames and redirects to that virtual host. I haven't tried it, but I think that might do what you're asking about.

  • How to configure Apache to serve static content? Please Help

    Hi Guys,
    I have a set of servers that are:
    - Apache acting as a Load Balance;
    - Admin Server;
    - A cluster with 2 managed servers.
    I have a web application deployed on my cluster, but I would like that the static content would be delivered by the Apache.
    How should I do it?
    Thanks in Advance

    Hi Daniel,
    A Reverse Proxy could do this but keep in mind that the primary goal of the RP is to shield your back channel infrastructure IP/access from either Internet or your private network e.g. secure your back channel infrastructure with a Firewall and expose it only to your Reverse Proxy infrastructure; quite effective for DoS type of attack.
    Apache can be configured to do both static content as well as Reverse Proxy.
    Regards,
    P-H
    http://javaeesupportpatterns.blogspot.com/

  • How to view the file content from the directory? getting Error:ORA-21560

    SQL> create directory READ_LOB_DIR as 'D:\Prj\Comm\Data';
    CREATE OR REPLACE Procedure READ_FILE_LOB IS
    -- Input Directory as specified in create directory
    l_dir CONSTANT VARCHAR2(30) := 'READ_LOB_DIR';
    -- Input File which is read word by word
    l_fil CONSTANT VARCHAR2(30) := 'testfile.txt';
    -- Separator Character between words is a BLANK (ascii = 32)
    l_seb CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(32));
    -- Character at the end of the file is NEWLINE (ascii = 10)
    l_sen CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(10));
    -- Pointer to the BFILE
    l_loc BFILE;
    -- Current position in the file (file begins at position 1)
    l_pos NUMBER := 1;
    -- Amount of characters have been read
    l_sum BINARY_INTEGER := 0;
    -- Read Buffer
    l_buf VARCHAR2(500);
    -- End of the current word which will be read
    l_end NUMBER;
    -- Return value
    l_ret BOOLEAN := FALSE;
    BEGIN
    -- Mapping the physical file with the pointer to the BFILE
    l_loc := BFILENAME(l_dir, l_fil);
    -- Check if the file exists
    l_ret := DBMS_LOB.FILEEXISTS(l_loc) = 1;
    IF (l_ret) THEN
    dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
    ' exists');
    -- Open the file in READ_ONLY mode
    DBMS_LOB.OPEN(l_loc, DBMS_LOB.LOB_READONLY);
    LOOP
    -- Calculate the end of the current word
    l_end := DBMS_LOB.INSTR(l_loc, l_seb, l_pos, 1);
    -- Process end-of-file
    IF (l_end = 0) THEN
    l_end := DBMS_LOB.INSTR(l_loc, l_sen, l_pos, 1);
    l_sum := l_end - l_pos - 1;
    DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
    dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
    EXIT;
    END IF;
    -- Read until end-of-file
    l_sum := l_end - l_pos;
    DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
    dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
    l_pos := l_pos + l_sum + 1;
    END LOOP;
    DBMS_LOB.CLOSE(l_loc);
    ELSE
    dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
    ' does not exist');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error:' || SQLERRM);
    DBMS_LOB.CLOSE(l_loc);
    END;
    The Text file content is...
    Copyright 1996,2001 Oracle Corporation.     All Rights Reserved
    This file contains installation instructions for installing the
    Oracle8 ODBC Driver software.
    It is divided into four parts:
    o Part I: Summary of systems supported by Oracle8 ODBC client
    software
    Lists the platforms on which the Oracle8 ODBC Client software can
    be installed.
    o Part II: Oracle8 ODBC Driver software.
    Describes the files, and installation prerequisites for the Oracle8
    ODBC driver software.
    o Part III: Exploding the kit onto your system
    Describes how to explode the kit onto your system hard drive.
    o Part IV: Installation Instructions
    Describes how to install the Oracle8 ODBC driver.
    Part I: Systems supported by the Oracle8 client software
    You can install the ODBC client software on any of the following systems:
    o Windows 2000
    o Windows NT X86
    o Windows 95
    o Windows 98
    The Oracle8 ODBC Driver provides support for ODBC connections
    from Windows 2000, Windows NT, Windows 95, and Windows 98 systems
    to Oracle databases.
    o Part II: Oracle8 ODBC Driver software.
    Refer to the following files for information about the Oracle8 ODBC Driver:
    LICENSE.TXT - Oracle8 ODBC Driver License Agreement. Read carefully
    before installing and/or using this product. Enclosed in
    your software distribution kit.
    SQORA.HLP - A Window's Help file which is the primary reference
              manual for the Oracle8 ODBC Driver.
    ODBCRelnotes.WRI - The release notes for the Oracle8 ODBC Driver
    which contains information which may have not been
    included in the Help file.
    Installation Prerequisites
    See the Oracle8 ODBC Driver release notes (ODBCRelnotes.WRI),
    for a complete list of software products required and their versions.
    Time Required
    The installation of the Oracle8 ODBC Driver takes approximately 5
    minutes. The actual time may be shorter or longer, depending upon
    your hardware configuration.
    Disk Space Required
    The Oracle8 ODBC driver installation requires approximately 2
    megabytes of available storage space. The space required depends upon
    what files you already have installed. The installation procedure
    checks to see if you have enough available disk space. If you do not,
    the installation fails.
    Part III: Exploding the Kit onto your system
    Expand the self-extracting archive file onto your hard drive.
    C:\> ORA8174.EXE
    Part IV: Installation Instructions
    Oracle8 ODBC Driver 8.1.7.4.0
    This section assumes the following:
    1. MS Windows 2000, Windows NT, Windows 95 or Windows 98 is running.
    2. Oracle Universal Installer shipping with 8.1.7 has already been
    installed on your system.
    3. Part III has been completed.
    Software fixes:
    Refer to release notes (ODBCRelnotes.wri) for a complete list of
    Software fixes.
    Installation Instructions
    Once the self-extracting archive file ORA8174.EXE has been
    exploded it will create an installable directory structure
    onto your hard drive. Run the Oracle Universal Installer from
    your local drive.
    1. On the screen "File Locations" use the "Browse" button of
    the source path to choose the file 'products.jar' from the
    folder that ORA8174.EXE was extracted to. Choose 'Next'.
    2. You will receive a warning that some of the dependencies of
    this product are not found in the staging area. This warning
    is OK. The ODBC driver depends on the Net8 Client being already
    installed on the system. Answer 'Yes' to continue.
    Oracle is a registered trademark of Oracle Corporation.
    Microsoft, MS are registered trademarks of Microsoft Corporation.
    Microsoft Windows, Windows NT, Windows 95, Windows 98 and Open Database
    Connectivity are trademarks of Microsoft Corporation.
    All other trademarks and registered trademarks are the property
    of their respective owners.
    The output was...
    File testfile.txt in Directory READ_LOB_DIR exists
    Copyright
    1996,2001
    Oracle
    Corporation.     
    All
    Rights
    Reserved
    This
    file
    contains
    installation
    instructions
    for
    installing
    the
    Oracle8
    ODBC
    Driver
    software.
    It
    is
    divided
    into
    four
    parts:
    o
    Part
    I:
    Summary
    of
    systems
    supported
    by
    Oracle8
    ODBC
    client
    Error:ORA-21560: argument 2 is null, invalid, or out of range
    I want to diplay/view as per file content format from the file under that specified directory.
    Have any other method / any help or suggestions would be really appreciated.

    I changed the code like...
    CREATE OR REPLACE Procedure READ_FILE_LOB_tmp IS
    -- Input Directory as specified in create directory
    l_dir CONSTANT VARCHAR2(30) := 'READ_LOB_DIR';
    -- Input File which is read word by word
    l_fil CONSTANT VARCHAR2(30) := 'testfile.txt';
    -- Separator Character between words is a BLANK (ascii = 32)
    l_seb CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(32));
    -- Character at the end of the file is NEWLINE (ascii = 10)
    l_sen CONSTANT RAW(100) := UTL_RAW.CAST_TO_RAW(CHR(10));
    -- Pointer to the BFILE
    l_loc BFILE;
    -- Current position in the file (file begins at position 1)
    l_pos NUMBER := 1;
    -- Amount of characters have been read
    l_sum BINARY_INTEGER := 0;
    -- Read Buffer
    l_buf VARCHAR2(4000);
    -- End of the current word which will be read
    l_end NUMBER;
    -- Return value
    l_ret BOOLEAN := FALSE;
    BEGIN
    -- Mapping the physical file with the pointer to the BFILE
    l_loc := BFILENAME(l_dir, l_fil);
    -- Check if the file exists
    l_ret := DBMS_LOB.FILEEXISTS(l_loc) = 1;
    IF (l_ret) THEN
    dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
    ' exists');
    -- Open the file in READ_ONLY mode
    DBMS_LOB.OPEN(l_loc, DBMS_LOB.LOB_READONLY);
    LOOP
    -- Calculate the end of the current word
    l_end := DBMS_LOB.INSTR(l_loc, l_sen, l_pos, 1);
    -- Process end-of-file
    IF (l_end = 0) THEN
    EXIT;
    END IF;
    -- Read until end-of-file
    l_sum := l_end - l_pos;
    DBMS_LOB.READ(l_loc, l_sum, l_pos, l_buf);
    dbms_output.put_line(UTL_RAW.CAST_TO_VARCHAR2(l_buf));
    l_pos := l_pos + l_sum + 1;
    END LOOP;
    DBMS_LOB.CLOSE(l_loc);
    ELSE
    dbms_output.put_line('File ' || l_fil || ' in Directory ' || l_dir ||
    ' does not exist');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Error:' || SQLERRM);
    DBMS_LOB.CLOSE(l_loc);
    END;
    Now its working fine with one addtional line...
    The file content is...
    This is My Content
    This is My Content
    This is My Content
    This is My Content
    This is My Content
    But The output was...
    File testfile.txt in Directory READ_LOB_DIR exists
    This is My Content
    This is My Content
    This is My Content
    This is My Content
    This is My Content
    here, i want to delete that additonal line...?

  • Not loading the Static content from the iPlanet document base

    Hi,
    I have configured I-planet and BEA 7.4 successfully. The document base for my
    iplanet has the pict directory.
    so when i try to access the pict directory from the browser say http://<>/pict/s.gif
    I get a Error 404--Not Found. I believe the web-server should serve my /pict directory
    by itself . Why is it that my requests are going to Web-logic..
    <Object name="hppreg" ppath="*/servlet/*">
    Service fn="wl_proxy" WebLogicHost="xxx.ffc.com" WebLogicPort="7001"
    </Object>
    I assume only the request with the /servlet should go to Web-logic.
    Any help is greatly appreciated
    Thanks,
    Nag

    The oracle driver library isn't on your classpath. It's normally called something like classes12.zip under the Oracle client installation directory.
    If you're working with Tomcat you need to copy the class library into common/lib and rename it to give it a .jar extension.

  • Weblogic 10.3 configuration for serving static content

    When we deploy Web Application the default document root of application will be its own root directory. If we want to have all the xml files on the disk to be in different location other than our deployment directory you can use virtual directory mapping in our Applications deployment descriptors. Below is the information on virtual directory mapping.
    virtual-directory-mapping
    =============================================================================
    Use the virtual-directory-mapping element to specify document roots other than the default document root of the Web application for certain kinds of requests, such as image requests. All images for a set of Web applications can be stored in a single location, and need not be copied to the document root of each Web application that uses them. For an incoming request, if a virtual directory has been specified servlet container will search for the requested resource first in the virtual directory and then in the Web application’s original document root. This defines the precedence if the same document exists in both places.
    Example:
    <virtual-directory-mapping>
    <local-path>c:/usr/gifs</local-path>
    <url-pattern>/images/*</url-pattern>
    <url-pattern>*.jpg</url-pattern>
    </virtual-directory-mapping>
    <virtual-directory-mapping>
    <local-path>c:/usr/common_jsps.jar</local-path>
    <url-pattern>*.jsp</url-pattern>
    </virtual-directory-mapping>
    Below edocs link has more information virtual directory mapping.
    http://e-docs.bea.com/wls/docs103/webapp/weblogic_xml.html#wp1039396
    - - Tarun

    Hi,
    I have a web application deployed to one of the managed server nodes.
    I need to access web application using the url http://<host>:<port>/webApp/
    I dont want to use that way.
    I need to access the welcome file directly without using the web application name like the one below.
    http://<host>:<port>/welcome.jsp
    I have read about virtual-directory-mapping and I have ran the examples which comes with weblogic installation.
    I have changed the weblogic.xml that comes with my application as follows
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
    <weblogic-web-app>
    <virtual-directory-mapping>
    <local-path>G:/Test</local-path>
    <url-pattern>/*.html</url-pattern>
         <url-pattern>/index.jsp</url-pattern>
    </virtual-directory-mapping>
    </weblogic-web-app>
    I have pasted fast_track.html and index.jsp to g:/Test folder.
    After i restart the managed server, am still getting" 404 Page not found" error.
    Kindly help.
    Thanks,
    Charan
    Edited by: charan27 on Sep 2, 2010 8:11 AM

  • Serving static pages from a web application

              My weblogic environment is a a front end proxy server (httpclusterservlet or apache) for
              session failover and static page serving, and a weblogic server. I have built my application as a
              web application creating a .WAR file which is deployed on the weblogic server (and defined in the
              weblogic.properties file). The problem is static pages in the web app cannot be found (because
              they are jar'ed up in the .WAR file). Am I missing something here? Has anyone encounter a similar
              problem?
              Mike
              

              I have done that! The problem is FileServlet cannot read a WAR file.
              "Cameron Purdy" <[email protected]> wrote:
              >Place them in the root of the WAR.
              >
              >Peac
              >
              >--
              >Cameron Purdy
              >Tangosol, Inc.
              >http://www.tangosol.com
              >+1.617.623.5782
              >WebLogic Consulting Available
              >
              >
              >"mwofford" <[email protected]> wrote in message
              >news:3a26ded6$[email protected]..
              >>
              >> My weblogic environment is a a front end proxy server (httpclusterservlet
              >or apache) for
              >> session failover and static page serving, and a weblogic server. I have
              >built my application as a
              >> web application creating a .WAR file which is deployed on the weblogic
              >server (and defined in the
              >> weblogic.properties file). The problem is static pages in the web app
              >cannot be found (because
              >> they are jar'ed up in the .WAR file). Am I missing something here? Has
              >anyone encounter a similar
              >> problem?
              >>
              >> Mike
              >
              >
              

  • Static content in iAS 6.5 (for JavaWebstart)

    Hello,
    I'm using iAS 6.5.
    I want to serve a jar file for JavaWebstart in a J2EE App (including a war file)
    That works, but it tooks a very long time before Webstart is loading this Jar and it is fully reloaded every time i access that App from Webstart.
    When I put this jar file into the iPlanet Webserver it is loaded much faster and will not be reloaded every time i access this jar file with Webstart.
    1. Is it possible to serve static content in iAS that Webstart is not fully reloading every time, instead of only checking the header informations for a newer version?
    2. Can you give me a link to an iPlanet documentation about how to handle static content iAS/iWS !
    3. Will be the iPlanet Webserver Settings (e.g. KeepAlive) ignored, when i run Webcontent from the Applicationserver (../NASApp/...)?
    Kinds
    Regards

    JAX-RPC, JAX-M and other JAX-x are tested with JDK 1.3.x and higher. Since iAS 6.5 uses jdk 1.3.1, I think JAX-RPC, JAX-M can be used in iAS 6.5. -Officially, as far as I know, iAS 6.5 does not provide any support for JAX-pack.
    Sun ONE AS 7 fully supports JAX-pack, and it has a tool, XRPCC, (now wscompile and wsdeploy) which generates stubs, ties and WSDLs for the services. Also the same tool can be used to generate the stubs, client side artifacts, from any WSDL file.
    And also JAX-run time provides SOAP 1.1, UDDI v2 Registry access and WSDL support. Interoparability between JAX-Run time and other SOAP 1.1 implementations is also tested successfully.
    There are several third partly tools available from different vendors (around 10-12), you may wish to search for them in google. And with that you may generate WSDL for your Apache SOAP services.
    If you are planning to have a standalone web services client, then you can directly use JWSDP at the client side to communicate with the Apache SOAP services on the iPlanet Application Server 6.5.
    Please get back for any further assistance.

  • Static contents

    A weblogic domain with at least 2 managed servers on it and configured a web
    application to serve
    static contents and it works great.
    When I add more images or htmls or any resources, then only the admin server
    picks it but not the
    managed servers. I have to redeploy the web application for the managed
    servers to see it.
    Does anybody know how setup the web application/managed servers pick up the
    new static resources
    without having to redeploy the web application? I can always use different
    web server for it but it
    increases the complexcity of the configuration for weblogic and apache/iis
    Please provide some idea.
    Thanks
    /selvan

    Selvan,
    Here's the info on how to refresh data files without redeploying. In
    6.1, this functionality is included in the release. For 6.0, I believe
    this tool was added in 6.0 sp2 rp2, but I'm not certain. If the tool
    doesn't exist in the version you have, contact support to get the
    correct service pack.
         -- Jim
    WebAppComponents can be refreshed without having to redeploy the whole
    application. any file that doesn't have classloading implications can be
    refreshed. (also known as static data). Examples of files that can be
    refreshed are: .jsp , .html, .gif, .jpg, .xml, .txt etc. Files that
    cannot be refreshed are class files, like ejb's, or other java classes.
    Data refresh in 6.0:
    In 6.0, there is a separate command line tool:
    weblogic.management.tools.WebAppComponentRefreshTool
    that can be invoked either on the command line, or can be constructed
    from within another java application. For information on how to run the
    tool from the command line, run 'java
    weblogic.management.tools.WebAppComponentRefreshTool' with no arguments.
    public WebAppComponentRefreshTool(String adminServerUrl,
    String username,
    String password,
    String appName,
    String compName,
    String[] jsps)
    username - the authenticated user...typically system
    password - the authenticated user's password
    appName - the name of the application (the mbean name)
    compName - the name of the component (the mbean name)
    jsps - an array of files to refresh.
    the appName, and compName are taken from the entries in config.xml. here
    is an example:
    <Application
         Deployed="true" Name="MyApp"
         Path=".\config\mydomain\myapps\MyApp">
         <WebAppComponent
              Name="MyWebAppComponent"
              Targets="managedServer,myserver"
              URI="MyWebAppComponent"/>
    </Application>
    in this case:
    appName would be MyApp
    compName would be MyWebAppComponent
    Data refresh in 6.1:
    refresh in 6.1 works the same way as it does in 6.0, but it has been
    folded into the weblogic.deploy command. you can still do refresh from
    either the command line, or from within a java application, but you can
    use weblogic.deploy to do it.
    Selvan Ramasamy wrote:
    >
    A weblogic domain with at least 2 managed servers on it and configured a web
    application to serve
    static contents and it works great.
    When I add more images or htmls or any resources, then only the admin server
    picks it but not the
    managed servers. I have to redeploy the web application for the managed
    servers to see it.
    Does anybody know how setup the web application/managed servers pick up the
    new static resources
    without having to redeploy the web application? I can always use different
    web server for it but it
    increases the complexcity of the configuration for weblogic and apache/iis
    Please provide some idea.
    Thanks
    /selvan

  • Serve up Static Content - configuration?

    Hello!
    How can I configure WEB AS to serve up static files from an external folder? Is there a configuration in WEB AS to map a context to an external folder with static files?
    Thanks
    /Ray

    Hi Ray,
    Eddy's reply refers to setting the option on the ICM. In case you don't use the ICM, but just the Web AS Java, you can do that using the HTTP Provide Service. You can either create a virtual host (this is the term on Web AS Java for virtual directory ) and set your external directory with static content as its root directory. You can refer to the <a href="http://help.sap.com/saphelp_nw04/helpdata/en/0b/fbf5a47928f84e8d0beba8371508e6/frameset.htm">documentation</a> for details about the configuration procedure.
    Regards,
    Ivo

  • Publishing content from reports server to a portal page

    I have a system with Forms/Reports 6i in a client/server implementation. I have 6i reports server from this on the server tier. I have added 9iAS (minimal install) to get Portal and HTTP server. I have completed the configuration and I can have the portal page submit jobs to the reports server and they are displayed properly.
    But I also wish to run reports from the application. This app submits jobs to the reports server via RWCLI60. I was hoping I could use 'File' as the destype and drop off content into a directory the web server knows about and then have a portal page that will generate links to the files. These could be pdf or html output.
    Can anyone tell me if this is possible and provide a short list of steps to configure it? Thanks.

    there is an example of this on dev2dev, see sample code, "redirect" example
    (dev2dev.bea.com)
    "Lancy Mendonca" <[email protected]> wrote:
    >
    All
    In a webflow how is it possible to redirect to a portal page from a input
    processor.
    The situation I have is as follows. I have a homepage that has a login
    portlet.
    The user enters the username and password and after performing the validation
    and authentication I need to redirect to another portal page that is
    available
    only to logged users.
    Any help will be creatly appreciated

  • Best Practice for serving static files (gif, css, js) from front web server

    I am working on optimization of portal performance by moving static files (gif, css, js) to my front web server (apache) for WLP 10 portal application. I end up with moving whole "framework" folder of the portal WebContent to file system served by apache web server (the one which hosts WLS plugin pointing to my WLP cluster). I use <LocationMatch> directives for that:
    Alias /portalapp/framework "/somewhere/servedbyapache/docs/framework"
    <Directory "/somewhere/servedbyapache/docs/framework">
    <FilesMatch "\.(jsp|jspx|layout|shell|theme|xml)$">
    Order allow,deny
    Deny from all
    </FilesMatch>
    </Directory>
    <LocationMatch "/partalapp(?!/framework)">
         SetHandler weblogic-handler
         WLCookieName MYPORTAL
    </LocationMatch>
    So, now browser gets all static files from apache insted of the app server. However, there are several files from bighorn L&F, which are located in the WLP shared lib: skins/bighorn/ window.css, wsrp.css, menu.css, general.css, colors.css; skins/bighorn/borderless/window.css; skeletons/bighorn/js/ util.js, buttons.js; skeleton/bighorn/css/layout.css
    I have to merge these files into the project and physically move them into apache served file system to make mentioned above apache configuration works.
    However, this approach makes me exposed bunch of framework resources, which I do not to intend to change and they should not be change (only custom.css is the place to make custom changes to the bighorn skin). Which is obviously not very elegant solution. The other approach would be intend to create more elaborate expression for LocationMatch (I am not sure it's entirely possible giving location of these shared resources). More radical move - stop using bighorn and create totally custom L&F (skin, skeleton) - which is quire a lot of work (plus - bighorn is working just fine for us).
    I am wondering what is the "Best Practice Approach" approach recommended by Oracle/BEA - giving the fact that I want to serve all static files from my front end apache server instead fo WLS app server.
    Thanks,
    Oleg.

    Oleg,
    you might want to have a look at the official WLP performance support pattern (Metalink DocID 761001.1 ) , which contains a section about "Configuring a Fronting Web Server Serving WebLogic Portal 8.1 Static Artifacts ".
    It was written for WLP 8.1, but most of the settings / recommendations should also to WLP 10.
    --Stefan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Serving Portal 8.1 SP2 content from Apache 2.0.43 configured using Plugin.

    Hi Friends,
    Ours is a Portal Enterprise app with 3 portal web apps in 8.1 SP2.
    We are planning to configure 2 Apache HTTP Web Servers as Front End Machines
    (External Load Balancer) with 2 Weblogic Portal back end machines with 4
    Weblogic Portal servers in a cluster.
    The 2 Weblogic Portal Back end Machines will be having the same Domain
    replicated by some means. So When one WL Admin Server is down, then we will
    use the other.
    In reference to this configuration,
    We are using Apache Http Plugin from BEA.
    How can we configure Apache and Weblogic server in order that all the static
    content will be served by Apache and dynamic content by Weblogic Server ?
    I mean to ask suppose I have webapp ,
    what will be correct set-handlers that I have use in httpd.conf and any
    changes to be done in Portal Web app to support this setting ?
    Please explain with example.
    Thanks,
    Karthi.

    Actually, XMLBeans are built into Workshop. Create a schema project and put your XSD into it. The beans will be generated automatically and included in your portal app.

  • Sepration of static content to seprate serve

    I am planning to move all my static content to different server since we have 4 different webserver serving the website on different sub-domain name.
    webfarm web1,web2,web3, web4
    Wat i need is all the page which uses static contents should have the complete address from static.yyyyyy.com. I dont want to hard code this in the jsp file, since in future if we planned to change means it will be great difficuilty to change all the 2k files. Can anyone tell me wat is the good design logic for this. In which layer i can perform this?
    i dont know whether to post in jsp forum or servlet. If i did wrongly , sorry..
    Edited by: arvindwill on Sep 28, 2009 2:21 AM

    Define it somewhere at 1 location (properties file? web.xml file? database?), load it during startup (ServletContextListener) and use it everywhere (using EL).

  • Creating a zip file from the contents of a directory

    hi, I am having a problem as the title suggests with a zip fil creation...
    using the basic example zip.java i wished to edit it so it doesnt zip a file fro the current directory but rather a directory i inputted.
    It is able to read the first file then throws out the following error with the code below it:
    java.io.FileNotFoundException: test.jpg (The system cannot find the file specified)
    import java.io.*;
    import java.util.zip.*;
    public class Zip {
       static final int BUFFER = 2048;
       public static void main (String argv[]) {
          try
             BufferedInputStream origin = null;
             FileOutputStream dest = new FileOutputStream("C:/Documents and Settings/Phil/My Documents/My Pictures/Work/test.zip");
             CheckedOutputStream checksum = new CheckedOutputStream(dest, new Adler32());
             ZipOutputStream out = new
               ZipOutputStream(new BufferedOutputStream(checksum));
             //out.setMethod(ZipOutputStream.DEFLATED);
             byte data[] = new byte[BUFFER];
             // get a list of files from current directory
             File f = new File("C:/Documents and Settings/Phil/My Documents/My Pictures/Work/");
             f.listFiles();
             String files[] = f.list();
             for (int i=0; i<files.length; i++)
                System.out.println("Adding: "+files);
    FileInputStream fi = new FileInputStream(files[i]);
    origin = new BufferedInputStream(fi, BUFFER);
    ZipEntry entry = new ZipEntry(files[i]);
    out.putNextEntry(entry);
    int count;
    while((count = origin.read(data, 0,
    BUFFER)) != -1)
    out.write(data, 0, count);
    origin.close();
    out.close();
    catch(Exception e)
    e.printStackTrace();
    After investigation i am lead to believe this is because the method returns an array of file and directory names only but not their path and the unqualified names would have therefore be defaulted to the current working directory. Something i understand if this is the case.
    So instead i used the File.listFiles() method to return an array
    of File objects, instead of an array of Strings as shown in the snippet of the changed code below (the changed code highlighted)...but arrived at another error on the second section of highlighted code meaning i cant compile. I cant understand why this is so!
    The error is: "cannot find symbol, Symbol: Contructor ZipEntry (Java.IO.file), location: class.java.util.zip.ZipEntry"
    File f = new File("C:/Documents and Settings/Phil/My Documents/My Pictures/Work/");
             **************File g[] = f.listFiles();***************
             **************String files[] = f.list();**************
             for (int i=0; i<g.length; i++)
                System.out.println("Adding: "+g);
    FileInputStream fi = new FileInputStream(g[i]);
    origin = new BufferedInputStream(fi, BUFFER);
    **************ZipEntry entry = new ZipEntry(g[i]);************
    out.putNextEntry(entry);
    int count;
    while((count = origin.read(data, 0,
    BUFFER)) != -1)
    out.write(data, 0, count);
    origin.close();
    out.close();
    Any help and thoughts most appreciated. Thank u in advance

    I'll admit i took 1 look at that reply an thought "thats stupid that wont work"...
    then a second look an though "actually, i should work i cant believe i didnt think of that"
    Anyways i tried it and it did work
    How are the duke dollars awarded, cos u should have them ordinary_guy
    cheers!

Maybe you are looking for