Tuesday, December 2, 2008

Calling Action on OnChange event of Drop Down List with Struts2

Last week I was having problem with drop down onchange event on strut project. I wanted to load some data to Drop down list according to another item in a drop down list when it is changed. Finally I found this way as the solution with JavaScript. Within the JSP page can be called any Struts Action using JavaScript function. I have mentioned some of sample code regarded to all steps.


Class Diagram for the scenario:-


Code sample for “VIEW” (createSchedule.jsp):-

---- JavaScript Code ----

<script type="text/javascript">

function onTypeChange() {

document.scheduleForm.action = 'loadCourcesForType.action';

document.scheduleForm.submit();

}

</script>

---- HTML Code ----

<s:select name="sch.course.courseTypes.typeId"

list="#session.crsTypes"

listKey="typeId"

listValue="typeName"

onchange="onTypeChange()" />

<s:select name="sch.course.courseId"

list="#session.courses"

listKey="courseId"

listValue="courseName" />


Code sample for STRUTS XML:-

<action name="loadCourcesForType"

method="loadCoursesForType"

class="com.abc.struts.action.ScheduleAction" >

<result name="success"&gt createSchedule.jsp </result&gt

</action>


Code sample for ACTION class (ScheduleAction.java):-

public String loadCoursesForType() {

// Load Courses to Session

courses = get courses due to the selected course type (as sch.getxxx(selected_type))

session.put("courses", courses);

return "success";

}

Friday, November 7, 2008

A nice Home Page for YOU

iGoogle (formerly Google Personalized Homepage and Google IG), a service of Google, is a customizable AJAX-based startpage much like Netvibes, Pageflakes, My Yahoo! and Windows Live Personalized Experience. It was originally launched in May 2005. Its features include the capability to add web feeds and Google Gadgets (similar to those available on Google Desktop).

It is really nice single page to track lot of internet stuff with your prefer. Then no need to open many windows or tabs to visit them individually. You can get lot of services such as Browsing mails, chatting on g-talk, looking videos on u-tube and browsing latest news through Google Gadgets. You can change look and feel also with themes.



Go to iGoogle now

Tuesday, November 4, 2008

Google Chrome: A new web browser for YOU

Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. I'm using Google Chrome for internet browsing in easy way. Try it now, I'm sure definitely you will be enjoyed.

FEATURES:-

One box for everything
Type in the address bar and get suggestions for both search and web pages.

Thumbnails of your top sites
Access your favorite pages instantly with lightning speed from any new tab.

Shortcuts for your apps
Get desktop shortcuts to launch your favorite web applications.

Download Google Chrome »

Sunday, October 26, 2008

Best Torrent clients for Linux

Deluge
Deluge is a full-featured BitTorrent client for Linux, Mac OS X and Windows. It uses libtorrent in its back end and PyGTK for its user interface.

Deluge features a rich plugin collection; in fact, most of Deluge's functionality is available in the form of plugins.

Deluge was created with the intention of being lightweight and unobtrusive. It is our belief that downloading shouldn't be the primary task on your computer and therefore shouldn’t monopolize system resources.

Deluge is not designed for any one desktop environment and will work just fine in GNOME, KDE, XFCE and others.

Deluge is Free Software and is licensed under the GNU General Public License.

The Deluge Team consists of Marcos Pinto, Andrew Resch, Sadrul Habib Chowdhury, and Martijn Voncken. Previous developers include Zach Tibbitts and Alon Zakai.

Deluge has a wide-array of features, including:

  • Web UI
  • BitTorrent Protocol Encryption
  • Mainline DHT
  • Local Peer Discovery (aka LSD)
  • FAST protocol extension
  • µTorrent Peer Exchange
  • UPnP and NAT-PMP
  • Proxy support
  • Web seed
  • Private Torrents
  • Global and per-torrent speed limits
  • Configurable bandwidth scheduler
  • Password protection
  • RSS
  • And much more!

Download http://deluge-torrent.org/downloads.php
One of Comment http://sheehantu.wordpress.com/2007/05/23/deluge-best-bittorrent-client-for-linux/


Azureus
Azureus is a BitTorrent client written in Java. The BitTorrent protocol is a new way of exchanging or distributing data over the internet. Downloading also means uploading, and the amounts of each are linked, to ensure fairness and rapidity in the spread of the file at hand.

For information on how to set up Azureus, see the Initial_Setup_Guide

To be able to download a file, you first need to get the associated .torrent file. This file, usually a dozen KB in size, is the “signature” of the much bigger file to be downloaded, and it needs special software to be read properly. Azureus is one of those types of software.

If you want to host files yourself, you need a tracker, which is basically a central server coordinating the connections between peers. Azureus can provide a tracker too.

You will find, as you discover its functionality, that it is easy to customize your copy of Azureus to exactly fit your needs. This guide is being developed on basis of an older User Guide and the 3.0.3.4 version of Azureus (Windows and Macintosh versions).


Home http://azureus.sourceforge.net/index.php
Installation Guide http://azureus.sourceforge.net/howto_linux.php
User Guide http://www.azureuswiki.com/index.php/User_Guide


Ktorrent
KTorrent is a BitTorrent client written in C++ for KDE using the Qt user interface toolkit. It is maintained in the KDE Extragear.

Upload and download speed capping / throttling & scheduling

  • Internet searching with torrent search engines using KHTML part.
  • Support for UDP trackers.
  • IP address blacklist plugin
  • Port forwarding with UPnP (Universal Plug and Play)
  • Protocol encryption
  • DHT (mainline version), and support for trackerless torrents
  • µTorrent peer exchange (PEX) support (as of 2.1 RC1).
  • File Prioritization
  • Ability to import partially-downloaded files
  • Directory scanner to automatically watch directories for new torrents
  • Manual addition of trackers to torrents
  • RSS feed support
  • Web interface plugin with default port number 8080

More http://en.wikipedia.org/wiki/KTorrent
Home http://ktorrent.org/


µTorrent (uTorrent)
µTorrent (or uTorrent and commonly abbreviated as "µT" or "uT") is a freeware BitTorrent client by BitTorrent, Inc. for Microsoft Windows written in C++. It gets the "µ" in its name from the SI prefix "micro" meaning one one-millionth and it refers to the program's small footprint. The program is designed to use minimal computer resources while offering functionality comparable to larger BitTorrent clients such as Vuze or BitComet. And They are going to release Mac version also nearly.

You can enjoy µTorrent on Linux using Wine, http://www.winehq.org/.

Home http://www.utorrent.com/index.php
To Beginners http://www.utorrent.com/beginners-guide.php

An Introduction to BitTorrent clients

What exactly is BitTorrent? If BitTorrent is an unknown concept to you, I highly suggest checking out Wikipedia’s article on exactly what BitTorrent is. If you don’t feel like reading that article, BitTorrent is essentially a protocol that is used for multiple computers to communicate with each other. Just like there is HTTP, SSH, FTP and IRC, BitTorrent is simply another way for computers to chat. Before there was BitTorrent, there was Napster and the many p2p clones that spawned from Shawn Fanning’s creation. Once those centralized p2p networks started to fail, BitTorrent was created to decentralize file sharing and ease the burden on file sharing servers. Now that we know the basic services that BitTorrent provides, let’s walk through the process of utilizing BitTorrent to download files and decide on the proper client for you.

Hardware and Software

Depending on which operating system you are running and the hardware that your computer is packing will partially decide which BitTorrent client you should or could use. Due to the fact that I run my computers on Windows XP, I will be focusing on XP compatible clients, however I still have a few links for non-XP readers. Different clients will require different resources to run, some require more memory, others will require more clock cycles, and some just won’t run at all depending on how old and limited your system is. Torrents do not require the fastest processor or the most amount of ram, but the one thing that will at least ease the burden on your computer will be a 7200 RPM drive. Since torrents do not sequentially access data from your hard drive, if you have a slow drive, the slow access times could potentially bottleneck you, but then again this will only be a concern if you are running a very high speed connection. So the basics are preferably something that runs your favorite operating system and I’d suggest at least 512MB of ram along with a decent capacity 7200 RPM drive. If you don’t plan on running your client 24/7 and distributing files, any computer will suffice, my recommendations are simply to make the downloading and sharing process the best it can be.

Reference http://gomeler.com/2006/04/23/an-introduction-to-bittorrent-clients/
More http://en.wikipedia.org/wiki/BitTorrent_client

About BitTorrent Protocol
Wikipedia http://en.wikipedia.org/wiki/BitTorrent_(protocol)

BitTorrent.org http://www.bittorrent.org/introduction.html

Monday, October 20, 2008

Install and Configure HUAWEI E220 on Ubuntu

Let see how it can be make it to run on your Ubuntu box. Firstly plug in the HUAWEI E220 modem to your Ubuntu 8.04 box and open up a new terminal window(a bash shell) and type the following to configure.

$ sudo wvdialconf /etc/wvdial.conf

Next you’ll see some results on your screen, it shows some details about the modem. Make sure that the system detects it as an USB modem first.

After that opens up the ‘wvdial.conf‘file as a root privileged user (with sudo command) using your preferred text editor such as vim, gedit, etc.

$ sudo vim /etc/wvdial.conf

There you’ll get some fields commented, uncomment the ‘Phone‘field and give the phone number as *99***1# and save the file. You may leave the Username and Password fields as it is.

Once you have finish with it type the following having the modem plugged.

$ sudo wvdial

After connecting successfully, open an another Terminal and install "salutis-connect" to connect internet easy way.

NOTE:- If it is retrying to connect more times, close an open a new terminal and try again to connect. If it has connected, it should show some connected details such as IPs, DNS etc and cursor will waiting... But don't close the terminal, try follow steps in another terminal. If you want to disconnect hit "CTRL + C" once.

$ sudo -s

# echo deb http://ppa.launchpad.net/salutis/ubuntu hardy main >> /etc/apt/sources.list
# aptitude update && aptitude install salutis-connect

Once the above process is finished goto Application > Internet and open the Salutis Connect. Select the first choice as shown in the following figure and click ‘Ok‘.

Next as shown with figure below it pops up a pane showing the progress of the connection establishment.

Once the connection is successfully established it tells you "Wohoo! You’re connected".

Go ahead ‘so enjoy. More information can be found by referring this link https://help.ubuntu.com/community/DialupModemHowto/Huawei/E220.

More http://huaweie220.blogspot.com/