Compression File in Apache Tomcat (GZIP)

March 28, 2010 Leave a comment

What is GZIP?

It is a compression format created by Jean-Loup Gailly and Mark Adler. Version 0.1 was first publicly released on October 31, 1992.

GZIP is based on the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding. DEFLATE was intended as a replacement for LZW and other patent-encumbered data compression algorithms which, at the time, limited the usability of compress and other popular archivers.

How does it helps in improving performance of my web page?

Modern browser like Internet Explorer, Firefox, Opera etc supports gzip compressed content. These browsers are capable of uncompressing gzip data into plain text. Servers like Apache, Tomcat, JBoss etc supports gzip compression too. Hence if gzip is enabled in such servers, the response if first compressed and then send to client. Hence this increase performance by many folds.

How to enable GZIP in my tomcat server?

Here is how to enable GZIP compression on Tomcat: edit file /conf/server.xml and add to the HTTP Connector configuration something like this:

compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"

An example of a HTTP Connector configuration with compression enabled could be:

<Connector port="8080" maxHttpHeaderSize="8192"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" redirectPort="8443" acceptCount="100"
        connectionTimeout="20000" disableUploadTimeout="true"
        compression="on"
  compressionMinSize="2048"
  noCompressionUserAgents="gozilla, traviata"
  compressableMimeType="text/html,text/xml"/>

Check out following header information before enabling GZIP.And after enabling GZIP look at the size of the webpage and the time taken for loading with firebug.  
Just Share .. try it :D 

New Ubuntu 10.04 Change is Coming

March 21, 2010 Leave a comment

Ubuntu as one of the most popular linux distros start make over herself with a new look and design to strengthen brandingnya. From the logo, theme and splash screen when booting all changed

The following splash screen display when booting :

And the following new theme GTK view :

Get it while it’s hot. ISOs and torrents are available at:

http://cdimage.ubuntu.com/releases/lucid/alpha-1/ (Ubuntu Desktop and Server)
http://uec-images.ubuntu.com/releases/lucid/alpha-1/ (Ubuntu Server for UEC and EC2)
http://cdimage.ubuntu.com/ports/releases/lucid/alpha-1/ (Ubuntu ARM)
http://cdimage.ubuntu.com/kubuntu/releases/lucid/alpha-1/ (Kubuntu Desktop and Netbook Remix)
http://cdimage.ubuntu.com/xubuntu/releases/lucid/alpha-1/ (Xubuntu)

Categories: all about linux Tags:

meebo widget on wordpress or your web & plugin for pidgin

March 21, 2010 Leave a comment

Display your chat meebo widget from your wordpress or site .

I created this Pidgin plugin for use with the meebo me widget. When people visit the web page on which your widget is placed, a buddy will automatically be added to your Pidgin buddy list in a group titled Meebo Guests. When they leave the site, the buddy will automatically be removed from your list. This removes the headache of having to authorize and add the buddy every time someone visits your web site.

Step 1 — Register meebo account & get script

first register in  meebo for get a script to be placed on the site .

follow step by step …

if it is done , get & adding script in your widget or site place ..

Step 2 — Setting Up Pidgin

An account must be created in Pidgin to communicate with the meebo widget. The settings below should be used to create the account:

Basic tab
Protocol: XMPP
Domain: meebo.org
Resource: Home

Advanced tab
Connect port: 5222
Connect server: meebo.org

Download

The plugin file should be placed in the Pidgin plugins folder. On Windows this is usually located at C:\Program Files\Pidgin\plugins. On Linux this might be something like /usr/lib/purple-2. For the 64 bit version, one user found that it should be placed at /usr/lib64/pidgin. Of course this may be different depending on your installation. It can then be enabled from the Plugins option in the Tools menu.

Windows (2.0.2): download
Linux (2.0.2): download
Linux 64 bit (2.4.3): download

Source (2.0.2): download

finished .. please try on your site .. keep work … !! :D

Build a Lava-Lamp Style Navigation Menu

March 21, 2010 Leave a comment

lavalamp

A couple weeks ago, I created a screencast that demonstrated how to build a three-level navigation menu. In a response email, one of our readers requested a tutorial on how to build a lava-lamp style menu. Luckily, it’s quite a simple task, especially when using a JavaScript library. We’ll build one from scratch today.

Step 1 Create the Mark-up

Before we can create this neat functionality, we need a base from which to work from. In your favorite code editor, create an unordered list for your navigation, and import both jQuery and jQuery UI, via Google.

read more …

Categories: all about web Tags: , ,

Change System from DHCP to a Static IP Address in Ubuntu

March 21, 2010 Leave a comment

If Your Ubuntu System has set to use DHCP, you will want to change it to a static IP address here is simple tip

open the /etc/network/interfaces file.

sudo vi /etc/network/interfaces

If you are using DHCP for your primary network card which is usually eth0, you will see the following lines

auto eth0
iface eth0 inet dhcp

As you can see, it’s using DHCP right now. We are going to change dhcp to static, and then there are a number of options that should add and here is the example and you can change these settings according to your network settings.

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Restart the neworking service using the following command

sudo /etc/init.d/networking restart

Categories: Uncategorized Tags:

apt-get ufw – UFW (Uncomplicated firewall) For Ubuntu

March 21, 2010 Leave a comment

Create a tool for host-based iptables firewall configuration. This tool should provide an easy to use interface to the user, as well as support package integration and dynamic-detection of open ports.

Install UFW in Ubuntu

Currently this firewall package is available in Ubuntu

sudo apt-get install ufw

This will complete the installation

Turn firewall on and off (‘disable’ is default ACCEPT)

# ufw enable|disable

Toggle logging

# ufw logging on|off

Set the default policy (ie “mostly open” vs “mostly closed”)

# ufw default allow|deny

Accept or drop incoming packets to (can see what services are available with ’status’ (see below)). can be specified via service name in /etc/services, ‘protocol:port’, or via package meta-data. ‘allow’ adds service entry to /etc/ufw/maps and ‘deny’ removes service entry from /etc/ufw/maps. Basic syntax:

# ufw allow|deny [service]

Display status of firewall and ports in the listening state, referencing /var/lib/ufw/maps. Numbers in parenthesis are not displayed to user

# ufw status

UFW Examples

Allow port 53

$ sudo ufw allow 53

Delete Allow port 53

$ sudo ufw delete allow 53

Allow port 80

$ sudo ufw allow 80/tcp

Delete Allow port 80

$ sudo ufw delete allow 80/tcp

Allow port smtp

$ sudo ufw allow smtp

Delete Allow port smtp

$ sudo ufw delete allow smtp

Allow fro Particular IP

$ sudo ufw allow from 192.168.254.254

Delete the above rule

$ sudo ufw delete allow from 192.168.254.254

GUI Tool for UFW

If you want GUI for UFW check this guide

Categories: all about linux Tags:
Follow

Get every new post delivered to your Inbox.