Using GZIP Compressed Static Content

I would like to have all of the Static Content (HTML, JS, CSS) compressed in advance to improve performance. I already have a compression filter for use on Dynamic Content.
We have managed to compress all of the static stuff using the GZIP format. Currently we have the files following the naming convention of appending ".gz" to the end of each file as in "MyPage.html" becomes "MyPage.html.gz" in the WAR file.
I was expecting that WebLogic would recognize this convention and automatically serve the appropriate file when the request came in. This doesn't seem to be happening:(
Is there a configuration mechanism to make this work, or a different convention for handling this problem?

Your idea should work, so let's walk through it:
1. Create a new Cocoa Application project
2. Create a new Objective-C class called "AppController"
3. Place the following code in the header file:
#import <Cocoa/Cocoa.h>
@interface AppController : NSObject {
IBOutlet NSPopUpButton *popupButton;
@end
4.Place the following code in the implementation file (beware of curly quotes if you cut and paste):
#import "AppController.h"
@implementation AppController
- (void)awakeFromNib
[popupButton removeAllItems];// necessary to remove "Item 1", etc
[popupButton addItemWithTitle:@"Test 1"];
[popupButton addItemWithTitle:@"Test 2"];
[popupButton addItemWithTitle:@"Test 3"];
[popupButton addItemWithTitle:@"Test 4"];
@end
4. Save, and open the nib file in Interface Builder
5. Drag an "Object" blue cube into the little Finder window, click on it, navigate to its Identity panel on the inspector, and set its class to "AppController"
6. Open the Window, which should be blank, and drag in an instance of "Pop Up Button"
7. To make the menu items from the AppController class appear in the popup menu, do the following:
Control-click on the AppController object and drag a blue line up to the Pop Up Button in the Window.
8. Save, build, and run.
That should be enough to at least get the menu items to appear in the popup menu.

Similar Messages

  • I work in a public library and we have two ipod touch and two ipod nanos we would like to circulate for our patrons. Any advice on how we can do this? Should we allow patrons to set the device up for personal use or download static content?

    I work in a public library and we have two ipod touch and two ipod nanos we would like to circulate for our patrons. Any advice on how we can do this? Should we allow patrons to set the device up for personal use or download static content?

    With the Nanos, you should have no problem lending them loaded with audiobooks from Librivox, etc.
    As for the iPod Touches, I'm not sure the question is whether you should allow patrons to set up the device for personal accounts, but whether you can prevent them from doing so. Prepare to to a factory restore every time one is returned.

  • Using gzip compression on iis

    I'm very new to php (i always used asp.net) and I'm beginning to like it. Now I'm experimenting and I try to compress the page. My webhost is on an IIS system and so is my local testing server.
    I try to compress the php file since it has a lot of data from a sql query.
    I start the php file with:
    <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
    { ob_start("ob_gzhandler");
        header('Content Encoding', 'compress,gzip');}
    else {
        ob_start();
    ?>
    end end it with
    <?php
    mysql_free_result($WADAda_user);
    ob_end_flush();
    ?>
    My settings in PHP for output compression are:
    zlib.output_compression = on
    ;zlib.output_compression_level = 9
    ; You cannot specify additional output handlers if zlib.output_compression
    ; is activated here. This setting does the same as output_handler but in
    ; a different order.
    ;zlib.output_handler =
    But IIS returns an internal server error (500) if I try to open the page. I must be doing something wrong. Can somebody help mebeacuse output compression for pages with large queries I find useful..

    Sashi,
    What gzip you are referring to here? Is it about caching jar files or what exactly? Please elaborate more.
    If you are referring to compression JAR files, please review the following document.
    Note: 123878.1 - Performance issues relating to Oracle Applications 11i client connections
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=123878.1
    Regards,
    Hussein

  • Compress a signed message using gzip

    Hi,
    I need to compress the signed message which is an object using gzip compression and later on decompress it. How can I do this? Do I need to write the object to a file in order to compress it? Can I do this without writing to a file?
    Thanks

    http://forum.java.sun.com/thread.jsp?thread=324835&forum=31&message=1317133

  • Gzip compression & decompression

    Hi,
    Can someone tell me how i could compress an object using gzip compression and decompress it.
    Thanks

    Try looking at the api documentation for the following classes:
    java.util.zip.GZIPInputStream
    java.util.zip.GZIPOutputStream
    and also try this tutorial
    http://java.sun.com/docs/books/tutorial/essential/io/

  • Using native IIS 6.0 Gzip Compression in front of WLS 8.1 SP5

    (IIS 6.0 => ISAPI proxy(/*) => WLS 8.1 SP5 )
    Instead of usign a servlet filter and Gzip compression inside the, I would like to test the IIS 6.0 Gzip compression. I want to do this because the IIS server farm is severley underutilized in CPU and seems like the best use of that resource.
    It is easy to config this in IIS 6.0. However, I can get IIS served static pages back compressed, but requests proxied to WLS return uncompressed, even though I have configured DLL calls to be zipped inide IIS.
    The question is: has anyone done this and if so, what is the config.

    I am trying to solve the same issue. This is what I've discovered so far. I have been able to get page compression to work with IIS 4.0 and 5.0 using the iisproxy plugin. The trick was to add both "jsp" and "wlforward" extensions to the script file list to compress dynamic files.
    IIS 6.0 changed the compression module from an ISAPI plugin to internal code. The configurations look the same, but I am not able to get JSPs to be compressed. I can compress static files, I can compress ASP files so I know I have compression working and I know that I have dynamic file compression working.
    This is a great article on configuring compression in IIS, it should get you started in the right direction. I know it's from a .Net site, but the fundamentals are the same and it's very well written.
    http://dotnetjunkies.com/Article/16267D49-4C6E-4063-AB12-853761D31E66.dcik
    I am now trying to figure out how to get IIS 6.0 dynamic page compression to work with the iisproxy plugin. Any ideas?

  • Use of fonts embedded in photoshop for commerical use? (Static content, like images)

    Hello.
    I am developing a Mobile game for Android, and I can't stop thinking about if i am in the clear when it comes to the use of fonts. I've searched the web, but can't really find a clear answer.
    I am using only font embedded in photoshop/illustrator, and only displaying them in static content, such as Images/logos. So my question is, am I in the clear, or do I need som kind for special license for this?
    FYI I am mostly using the MonoType Impact font. I stumbled over this though, its Monotypes Imaging EULA for fonts ( I think). It says :
    You may embed static graphic images into an electronic document, including a Commercial Product, (for example, a "gif") with a representation of a typeface and typographic design or ornament created with the Font Software as long as such images are not used as a replacement for Font Software, i.e. as long as the representations do not correspond to individual glyphs of the Font Software and may not be individually addressed by the document to render such designs and ornaments.
    Would appreciate any help, thanks!

    you can access them from <bpelx:exec> activity and you can pass these returned document to underlying java class.
    Re: getVariableData in Java Exec

  • Is it possible to compress SWF files using gzip?

    I am using gzip for all the files of my server but my swf doesn't seem to be getting compressed also "swfobject_modified.js" used by the SWF file doesn't get compressed as well, whereas other .js files are getting compressed. Any suggestions ?

    For quite a while swfs are (by default) (g)ziped when published. You can change that under the publish-settings using the flash tab. Regarding the swfobject, I think that the code is very size optimized, whereas your regular run of the mill self-made .js is mostly optimized for readability.
    M

  • XML compression using GZip (Urgent)

    Hi ,
    I am compressing XML on the fly using GZip and storing it in a Database. When required we uncompress using same utility and everything works fine until we encounter a large XML (more than 1200 Bytes). What happens then is XML is Truncated and final few tags are missing in the uncompressed XML. I am not sure if the Compression is truncation or the Uncompress ....
    Please look into the code sinppets and lemme know if you find any bugs there....
    CompressMethod............
    String someXML = "....long xml....";
    try {
    int length = someXML .trim().length();
    ByteArrayOutputStream baos =
    new ByteArrayOutputStream(length);
    ByteArrayInputStream bis = new ByteArrayInputStream(filename.trim().getBytes());
    GZIPOutputStream gos = new GZIPOutputStream(baos);
    byte[] buffer1 = new byte[9092];
    int bytesRead;
    while ((bytesRead = bis.read(buffer1)) != -1) {
    gos.write(buffer1, 0, bytesRead);
    bis.close();
    gos.close();
    return baos.toByteArray();
    For Uncompressing ..................
    ByteArrayInputStream bai = new ByteArrayInputStream(filename);
    byte[] buffer = new byte[9092];
    GZIPInputStream gos =
    new GZIPInputStream(bai);
    gos.read(buffer,0,buffer.length);
    gos.close();
    orig = new String(buffer,"iso-8859-1");
    Any Help at the earliest is appriciated and REWARDED !!!!!!!

    I'm not quite sure why you are doing some of the things your are. It might be your haste in getting a code "snippet" to show.
    String someXML = "....long xml....";...
    int length = someXML .trim().length();...
    ByteArrayInputStream(filename.trim().getBytes());Is your xml really in a known String like "someXML" or is it being read from the file represented by "filename"? If it is in a string and you wish to find the length of the trimmed article, then trim it first and reference only the trimmed String from then on. If you take the length of a temporarily trimmed String and then use the non-trimmed String you may be cutting data off of the end.
    Also, if your xml is in a String there is no need to have a read loop. Just write your byte array in one call.
    The length of the trimmed string is the only thing that I see that could cause your loss of data.

  • Is it possible to use XHTML (static content) whilst writing JSPs in XML?

    Hi Everyone,
    I am currently trying to get my head around the whole XML syntax for JSP. Unfortunately there doesn't appear to be a well rounded tutorial on the net about this so I will lay my questions to rest here.
    Firstly I have managed (with the help of some very kind Java Developer Connection users) to write a JSP page in XML syntax (including the <jsp:root> element, and the like). However even when I follow all of the correct conventions my html content ends up causing the page compilation to fail. The problem is that the html content in my JSPs is being read as XML even though it is being enclosed in <jsp:text> elements. For this reason I am getting compilation failures because of deprecated tags like <br> within my html.
    For this reason I am attempting to switch my static content into XHTML, I figure that this will offer some sort of solution. However when I try to convert my html content into xhtml I end up getting a failure around the DOCTYPE declaration that xhtml is required to use.
    Does anybody out there know if jsp xml syntax and xhtml can be used together, and if so could you please point me in the right direction?
    Thanks for your assistance.
    Regards
    David

    I'm looking into this topic too.
    Here is one article I've found on the web regarding the usage of XML syntax for the JSP document.
    http://www.onjava.com/pub/a/onjava/2001/11/28/jsp_xml.html
    I do know that xhtml requires that your tags be "closed". So for example the <br> tag would look like
    and so on.
    As far as the DOCTYPE tag which gives the XHTML specification via DTD to the browser, you can find examples here...
    http://www.w3.org/TR/xhtml1/#dtds
    You'll find examples for Strict, Transitional, and Frameset XHTML
    I have gotten a failure on the DOCTYPE tag when I have attempted to test offline, because the dtd was inaccessible. But once online it worked.

  • Gzip compression issues from using a proxy?

    Hello I am unable to load some websites now from suspected gzip compression issues? I have been using a proxy and now my firefox browser is messed up Plz Help [email protected]
    Thanks

    It is possible to autenticate to a proxy server, but the question is what tye of authentication your proxy is carrying out . "Basic" or "digest".If it is Basic then you can use Base64 authentication scheme. You have to first set the System property variable to find proxy server (like port and IP Address)

  • GZIP Compression Issue in Weblogic 8.1

    Has anyone experienced issues with gzip compression filtering in 8.1?
    After about 2 months of dev. and testing with the filter, a bug has been found
    in our portal, and I have traced it back to the filter that I downloaded from
    dev2dev code and utilities.
    It is strange. The only time I see an issue is when a user clicks the "back button"
    in the browser itself to go back to a previous page, AND then clicks a link (for
    example) in a portlet that is tied to an action in a jpf for that portlet. The
    error only happens for actions in a portlet that are local to that portlet (no
    forwarding to other portlets or anything fancy)...just pure "local internal forwards."
    If you do this, USING THE BACK BUTTON to get back to this page with the portlet,
    when you click the action, you are actually taken to the page where you were when
    you clicked the back button.
    I have re-created this is simple portals that have no content, so I know it is
    not something else I introduced.
    Any ideas? Maybe it is the filter-mapping pattern I am using??? I am currently
    mapping on *.portal, but this is the only situation that seems to break.

    For those interested, I have some updates on this subject and someone out there sent me a mail asking if I ever found anything out.
    Basically, when I encountered this issue the first time, I was working on a SP2 Portal. We were having numerous small bugs like this one with SP2 that centered around the back button or refresh button. BEA gave us a "super patch" back in July or so that when applied to our SP2 project, fixed our issue. I have sense moved onto SP3, and I did not see the compression issue (so I think SP3 must have the patches correctly setup...like I would assume it would).

  • Enabling GZIP compression on the HTTPBC or a suggested alternative approach

    Hi,
    I posted this on the openusb-users group, but I haven't come up with a good solution yet.
    Any takers?
    Thanks,
    Rob
    http://openesb-users.794670.n2.nabble.com/gzip-compression-support-in-HTTP-BC-tp5366301.html
    Does anybody know whether the HTTP BC shares all of the same features that the Glassfish HTTP listener supports such as gzip compression? If so, where are those parameters specified for the HTTP BC? (Compression of the XML can of course make a tremendous bandwidth savings for the typical XML passed around via SOAP.)
    Please see:
    http://docs.sun.com/app/docs/doc/820-4338/abhco?a=view
    compression - on
    Specifies use of HTTP/1.1 GZIP compression to save server bandwidth. Allowed values are:
    off – Disables compression.
    on – Compresses data.
    force – Forces data compression in all cases.
    positive integer – Specifies the minimum amount of data required before the output is compressed.
    If the content-length is not known, the output is compressed only if compression is set to on or force.
    compressableMimeType text/html,text/xml,text/plain
    Specifies a comma-separated list of MIME types for which HTTP compression is used.
    If there isn't a way to configure the HTTPBC, What would be the best way to enable a gzip compression of the XML for the HTTPBC or JBI framework in general?
    My first approach might be to just have a Glassfish HTTP-Listener based WebService delegate to the HTTPBC or more directly to the JBI SE components if possible. Maybe a filter on the HTTPBC to gzip the payload? Are there any plans to refactor HTTPBC to use the Glassfish HTTP Listener code, it appears to have more capability and options?
    Rob

    I tried it did not work.
    Below are the steps which I did:
    Test2: Table level compression test
    ===================================
    CREATE TABLE SCOTT.TEST_PMT_TAB_COMP
    PMT_ID INTEGER NOT NULL,
    PMT_AGCY_NBR CHAR(7 BYTE),
    PMT_SBAGCY_NBR CHAR(7 BYTE),
    PMT_PAY_DT DATE,
    PMT_POL_NBR CHAR(14 BYTE),
    PMT_POL_SEQ_NBR CHAR(2 BYTE),
    PMT_PRM_INSD_NM VARCHAR2(30 BYTE),
    PMT_PAY_TYP_DESC VARCHAR2(20 BYTE),
    PMT_PAY_AMT NUMBER(11,2),
    PMT_POST_DT DATE
    COMPRESS FOR ALL OPERATIONS;
    inserting record from the test table:
    SQL> insert into SCOTT.TEST_PMT_TAB_COMP select * from SCOTT.TEST_PMT;
    5051013 rows created.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from scott.TEST_PMT_TAB_COMP;
    COUNT(*)
    5051013
    Checking size:
    SQL> select bytes/1024/1024, segment_name, owner, segment_type, tablespace_name from dba_segments where segment_name='TEST_PMT_TAB_COMP';
    BYTES/1024/1024 SEGMENT_NAME OWNER SEGMENT_TYPE TABLESPACE_NAME
    776 TEST_PMT_TAB_COMP SCOTT TABLE USERS_DATA01
    SQL> select owner, table_name, COMPRESSION, COMPRESS_FOR from dba_tables where table_name='TEST_PMT_TAB_COMP';
    OWNER TABLE_NAME COMPRESS COMPRESS_FOR
    SCOTT TEST_PMT_TAB_COMP ENABLED OLTP
    Now it is occupying more size.

  • Adobe Air needs HTTP gzip compression

    Hello
    We are developing an Adibe Air application. We use SOAP for
    service calls and we depend entirely upon gzip HTTP compression to
    make the network performance even vaguely acceptable. SOAP is such
    a fat format that it really needs gzip compression to get the
    responses down to a reasonable size to pass over the Internet.
    Adobe Air does not currently support HTTP gzip compression
    and I would like to request that this feature be added ASAP. We
    can't release our application until it can get reasonable network
    performance through HTTP gzip compression.
    Thanks
    Andrew

    Hi blahxxxx,
    Sorry for the slow reply -- I wanted to take some time to try
    this out rather than give an incomplete response.
    It's not built into AIR, but if you're using
    Flex/ActionScript for your application you can use a gzip library
    to decompress a gzipped SOAP response (or any other gzipped
    response from a server -- it doesn't have to be SOAP). Danny
    Patterson gives an example of how to do that here:
    http://blog.dannypatterson.com/?p=133
    I've been prototyping a way to make a subclass of the Flex
    WebService class that has this built in, so if I can get that
    working it would be as easy as using the Flex WebService component.
    I did some tests of this technique, just to see for myself if
    the bandwidth savings is worth the additional processing overhead
    of decompressing the gzip data. (The good news is that the
    decompression part is built into AIR -- just not the specific gzip
    format -- so the most processor-intensive part of the gzip
    decompression happens in native code.)
    Here is what I found:
    I tested this using the
    http://validator.nu/ HTML validator
    web service to validate the HTML source of
    http://www.google.com/. This
    isn't a SOAP web service, but it does deliver an XML response
    that's fairly large, so it's similar to SOAP.
    The size of the payload (the actual HTTP response body) was
    5321 bytes compressed, 45487 bytes uncompressed. I ran ten trials
    of each variant. All of this was done in my home, where I have a
    max 6Mbit DSL connection. In the uncompressed case I measured the
    time starting immediately after sending the HTTP request and ending
    as soon as the response was received. In the compressed case I
    started the time immediately after sending the HTTP request and
    ended it after receiving the response, decompressing it and
    assigning the compressed content to a ByteArray (so the compressed
    case times include decompression, not just download). The average
    times for ten trials were:
    Uncompressed (text) response: 1878.6 ms
    Compressed (gzip) response: 983.1
    Obviously these will vary a lot depending on the payload
    size, the structure of the compressed data, the speed of the
    network, the speed of the computer, etc. But in this particular
    case there's obviously a benefit to using gzipped data.
    I'll probably write up the test I ran, including the source,
    and post it on my blog. I'll post another reply here once I've done
    that.

  • Discoverer Servlet with Web Cache gzip Compression

    Hi,
    we have some Discoverer Worksheets which we want to access by ISDN dial in (64 kbit/sec). To speed up the response time when users use this slow connection, we want to activate Web Cache gzip compression.
    But even when we enable Web Cache for Discoverer (configuration.xml), Web Cache don't compress pages generated by Discoverer Viewer. We found out that the generated responses contain the "content-disposition" HTTP-Header entry. Are we correct that this is the reason why there is no gzip compression? AND DOES ANYONE KNOW A WORKAROUND???
    Best regards,
    Matthias Scherer

    When you set the caching rules, you can also specify whether or not you want the pages to be compressed. Web Cache compresses html pages and relies on the accept-encoding: gzip from the client header to determine whether or not to send the content compressed.

Maybe you are looking for