Wednesday, October 15, 2008

PTC Terbaik di Tahun Ini

Pekerjaan saya mengharuskan saya ada didepan laptop dengan sambungan internet minimal 10 jam sehari. Pertama sekitar 1 th lalu cuma iseng2 saja krn ikut teman . Tapi sekarang saya sudah gabung dengan sekitar 2 PTC dan income saya sudah minimal $200/bulan hanya dari PTC, lumayan lah tanpa menambah waktu kerja saya dan tanpa mengganggu kerja utama.

PTC yang Pertama : http://www.pay2surf.net/register.php?r=dolpho
PTC yang Kedua : http://www.crewbux.com/register.php?r=DolpHo

Thanks,

DolpHo

Friday, August 22, 2008

The Basics: Building Your Site

Since this book came out lots of people started asking me how they can make money with AdSense. I’m always happy to help people make the most of Google, but many of these people didn’t even have a website!

Here’s the bad news: to make money with AdSense, you’ve got to have a website. There’s no getting around that. The good news though is that it’s never been easier to create a website from scratch and use it to generate real revenue.

I’m going to give a brief introduction here to creating a website from the ground up. You can find plenty more information online and I’ll tell you where to look. A good place to start is my own book How To Build Profitable Websites Fast, available at www.buildawebsitefast.com.

If you already have a site up and running, you can just skip this bit, head down to 1.10 and begin reading about how to improve your AdSense revenues.

Tuesday, August 19, 2008

Network Architecture IEEE 802.11

After knowing architecture from protocol 802.11, we also need to comprehend standard of network architecture 802.11, released by IEEE. Before feebleness solution and make-up of security protocol 802.11.


  1. Basic Service Set (BSS)

  2. Configuration BSS minimize there are a Access-Point which in circuit to network of cable or internet. This Access-Point recognized also as managed network. Communication of among two stations, for example A and B, have to from station A to Former Access-Point later then Access-Point repeat to send data to B. To develop build a network with server of at this configuration, server placed at Access-Point and Other stations as client.

    Traffic Flow to operate for Basic Service Set (BSS) is the following:


  3. Independent Basic Service Set (IBSS)

  4. Configuration of Independent Basic Service Set (IBSS) known as by an independent configuration. Logically configuration IBSS loo like with network of cable peer-to-peer, where communications usher station earn conducted directly without existence of managed network. This type IBSS recognized also as ad-hoc network and generally for network wireless in finite by space and is not interfaced to by network of computer or broader internet.


  5. Extended Service Set (ESS)
  6. Extended Service Set (ESS) consisted of some Basic Service Set (BSS) what each other overlap and each having Access-Point. Access-Point one another attributed to by Distributed System (Ds). Distributed System (Ds) can in the form of cable and or wireless. So there is 2 kinds of Extended Service Set (ESS) such as at picture in the following is :

    1. Extended Service Set (ESS) by using cable to Distributed System
    2. Traffic flow to operate for Extended Service Set (ESS) by using cable to Distributed System is the following :


    3. Extended Service Set (ESS) by using wireless to Distributed System
    4. Traffic Flow to operate for Extended Service Set (ESS) by using wireless for Distributed System is the following:

Standar Layer Protocol 802

Before studying feebleness and make-up of security protocol 802.11, us have to know ahead construction layer of at protocol 802. Picture - 1 in the following is showing comparison layer of at protocol 802 model with OSI.



Function from physical layer is :

  • Encoding/decoding Signal

  • Transmission and receiver of Data beet

Function from Medium Access Control (MAC) layer is :

  • In transmission, including data into frame with address and as error detection

  • In Acceptance, cozening frame become data and address also as error detection

Function from Logical Link Control (LLC) layer is :

  • As link to higher layer and [do/conduct] control of stream and error (mistake)

Arsitektur protocol 802.1

Architecture Protocol 802.11 shown by such as picture two in the following is :

Fundamental function at Medium Access Control (MAC) layer 802.11adalah :

    • Data’s deliverer which reliable

    • Controller of Data Access

    • Security
Arsitektur Media Acces Control (MAC) Protocol 802.11

But of architecture Detail from frame Medium Access Control (MAC) 802.11 shown at picture three in the following is :



From frame MAC 802.11 above which need paid attention to by is function from frame control. Because from frame control of this is conducting the fundamental functions from MAC done inclusive of in the case of security.

Saturday, August 16, 2008

System Requirements Software - Java 2 SDK Standard Edition 1.4.2

Software - Java 2 SDK Standard Edition, 1.4.2 is supported on i586 Intel and 100% compatible platforms running Microsoft Windows. For a list of supported operating systems and desktop managers, see System Configurations.

Hardware - Intel and 100% compatible processors are supported. A Pentium 166MHz or faster processor with at least 32 megabytes of physical RAM is required to run graphically based applications. At least 48 megabytes of RAM is recommended for applets running within a browser using the Java Plug-in. Running with less memory may cause disk swapping which has a severe effect on performance. Very large programs may require more RAM for adequate performance.

For the amount of disk space required, see Windows Disk Space Requirements.

Note -- Trying to install the Java 2 SDK on a non-supported version of Microsoft Windows or on a machine that doesn't have a sufficiently up-to-date Service Pack will cause the installer to generate this warning: "We recommend that you do not install this Java Platform for the following reasons: This Java Platform does not support the operating system or operating-system service pack on this machine."

Installation Instructions

In this procedure, you will run the self-installing executable to unpack and install the Java 2 SDK software bundle. As part of the Java 2 SDK, this installation includes the Java Plug-in and Java Web Start, as well as an option to include the public Java 2 Runtime Environment. (The Java 2 SDK also contains a private J2RE for use only by its tools.)

For issues related to Windows Installation (IFTW) and Java Update, see the Windows Installation (IFTW) and Java Update FAQ. See this note on Proxy Settings and Authentication.

Print or bookmark these instructions - After the Java 2 SDK software has been installed, you may be asked to reboot your system. To continue using these instructions after rebooting, either print this page now, bookmark it now, or use your Web browser's history function to get back to this page.

Troubleshooting - If you have any difficulties, see the Troubleshooting section at the end of this document or submit a bug report for your installation problem.

Note: For any text on this page containing the following notation, you must substitute the appropriate update version number for the notation.

For example, if you are downloading the installer for update 1.4.2_01, the following file name:

j2sdk-1_4_2_-windows-i586.ex

would become:

j2sdk-1_4_2_01-windows-i586.exe

1. Check the download file size (Optional)

If you save the self-installing executable to disk without running it from the download page at the web site, notice that its byte size is provided on the download page. Once the download has completed, check that you have downloaded the full, uncorrupted software file.
2. If 1.4.2 Beta is installed, uninstall it.

Use the Microsoft Windows Add/Remove Programs utility, accessible from the Control Panel (Start -> Settings -> Control Panel).

3. Run the Java 2 SDK installer
Note - you must have administrative permissions in order to install the Java 2 SDK on Microsoft Windows 2000 and XP.

The file j2sdk-1_4_2_-windows-i586-i.exe is the Java 2 SDK installer. If you downloaded it instead of running it directly from the web site, double-click on the installer's icon. Then follow the instructions the installer provides. The installer may ask you to reboot your computer.

When done with the installation, you can delete the download file to recover disk space.

Note -- Trying to install the Java 2 SDK on a non-supported version of Microsoft Windows or on a machine that doesn't have a sufficiently up-to-date Service Pack will cause the installer to generate this warning: "We recommend that you do not install this Java Platform for the following reasons: This Java Platform does not support the operating system or operating-system service pack on this machine." See the system requirements above for information on supported configurations of Microsoft Windows.

Installed Directory Tree

The Java 2 SDK has the directory structure shown below.





                  j2sdk1.4.2_
____________________|___________________
| | | | | | | | |
| | | | bin lib | demo |
| | | LICENSE | | | jre
| | COPYRIGHT | __|__
| README.txt include | |
readme.html bin lib
In addition, the Java Plug-in and Java Web Start will automatically be installed. Look for a Java Web Start icon on your desktop. There will also be an entry for Java Web Start in the Start -> Programs menu.
Java Web Start --
  • Compatibility: The release of Java Web Start that comes with this SDK/JRE can be run on SDK/JRE 1.2.2 or later. It will not work with SDK/JRE 1.1.x or earlier.

  • Upgrading from Previous Versions: If you have a previous release of Java Web Start, do not uninstall it. Uninstalling it will cause the download cache to be cleared, and all previously installed Java Web Start application data will have to be downloaded again. This new release will overwrite previous installations and automatically update browsers to use this new release. The configuration files and program files folder used by Java Web Start have changed, but all your settings will remain intact after the upgrade, since Java Web Start will translate your settings to the new form.

  • Uninstalling 1.4.2 SDK/JRE: The only way to uninstall Java Web Start 1.4.2 is to uninstall the 1.4.2 SDK/JRE. But note that doing so will remove the 1.4.2 Java Web Start cache, which stores the Java Web Start application data. Uninstalling the SDK/JRE will not, however, remove the cache for previous releases of Java Web Start (1.0.1 and 1.2). Previous releases have separate uninstallers for Java Web Start.

  • Using Java Web Start with Netscape 6.x/7.x: For Netscape 6.x/7.x users, setup the Java Web Start MIME type (JNLP) in the Edit->Preferences->Navigator->Helper Applications section. The file extension is jnlp; MIME Type is application/x-java-jnlp-file. It should be handled by the javaws executable file in your Java Web Start directory. Also note that, due to a problem with the JavaScript in Netscape 6.x/7.x, you must use the non-JavaScript version of the demos page.

4. If you want to run Netscape 7.x/Mozilla 1.x with Java Plug-in, do this:

  • Exit the Netscape 7.x/Mozilla 1.x browser and all Netscape 7.x/Mozilla 1.x "objects" (Messenger, Composer ...);

  • If the Quick Launch feature is enabled, disable it;

  • Then restart Netscape 7.x/Mozilla

5. Update the PATH variable (Optional)

You can run the Java 2 SDK without setting the PATH variable, or you can optionally set it as a convenience.

Should I set the PATH variable?

Set the PATH variable if you want to be able to conveniently run the Java 2 SDK executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. If you don't set the PATH variable, you need to specify the full path to the executable every time you run it, such as:

C:> \j2sdk1.4.2_\bin\javac MyClass.java

It's useful to set the PATH permanently so it will persist after rebooting.

How do I set the PATH permanently?

To set the PATH permanently, add the full path of the j2sdk1.4.2_\bin directory to the PATH variable. Typically this full path looks something like C:\j2sdk1.4.2_\bin. Set the PATH as follows, according to whether you are on Microsoft Windows NT or 98/2000/ME.

Microsoft Windows NT, 2000, and XP - To set the PATH permanently:

  1. Choose Start, Settings, Control Panel, and double-click System. On Microsoft Windows NT, select the Environment tab; on Microsoft Windows 2000 select the Advanced tab and then Environment Variables. Look for "Path" in the User Variables and System Variables. If you're not sure where to add the path, add it to the right end of the "Path" in the User Variables. A typical value for PATH is:

         C:\j2sdk1.4.2_\bin

    Capitalization doesn't matter. Click "Set", "OK" or "Apply".

  2. The PATH can be a series of directories separated by semi-colons (;). Microsoft Windows looks for programs in the PATH directories in order, from left to right. You should only have one bin directory for a Java SDK in the path at a time (those following the first are ignored), so if one is already present, you can update it to j2sdk1.4.2_\bin.

  3. The new path takes effect in each new Command Prompt window you open after setting the PATH variable.

Microsoft Windows 98 - To set the PATH permanently, open the AUTOEXEC.BAT file and add or change the PATH statement as follows:

    1. Start the system editor. Choose "Start", "Run" and enter sysedit, then click OK. The system editor starts up with several windows showing. Go to the window that is displaying AUTOEXEC.BAT

    2. Look for the PATH statement. (If you don't have one, add one.) If you're not sure where to add the path, add it to the right end of the PATH. For example, in the following PATH statement, we have added the bin directory at the right end:

    3. PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\J2SDK1.4.2_\BIN

      Capitalization doesn't matter. The PATH can be a series of directories separated by semi-colons (;). Microsoft Windows searches for programs in the PATH directories in order, from left to right. You should only have one bin directory for a Java SDK in the path at a time (those following the first are ignored), so if one is already present, you can update it to j2sdk1.4.2_.


    4. To make the path take effect in the current Command Prompt window, execute the following:
    C:> c:\autoexec.bat

    To find out the current value of your PATH, to
    see if it took effect, at the command prompt, type:

    C:> path

Microsoft Windows ME - To set the PATH permanently:

From the start menu, choose programs, accessories, system tools, and system information. This brings up a window titled "Microsoft Help and Support". From here, choose the tools menu, then select the system configuration utility. Click the environment tab, select PATH and press the edit button. Now add the SDK to your path as described in step b above. After you've added the location of the SDK to your PATH, save the changes and reboot your machine when prompted.

6. Start using the Java 2 SDK!

Your computer system should now be ready to use the Java 2 SDK. In this step, you'll run some simple commands to make sure it is working properly.

If you are new to developing and running programs in the Java programming language, see The Java Tutorial online for some guidance. Note especially the tutorial trails under the heading Trails Covering the Basics.

You can also download the Java 2 SDK documentation from the Java 2 SDK download page.

7. Uninstalling the Java 2 SDK

If you should ever want to uninstall the Java 2 SDK, use the "Add/Remove Programs" utility in the Microsoft Windows Control Panel. As an alternative method, if you still have the original installation program that you used to install the Java 2 SDK, you can double click on it to launch an uninstall program.

If you use the Invocation API to launch an application directly rather than using the Java application launcher, be sure to use the correct paths to invoke the Java HotSpot Client Virtual Machine (VM) or Java HotSpot Server VM, as desired. The path within the Java SDK to the Java HotSpot Client VM is:

jre/bin/client/jvm.dll(on x86)

The path to the Java HotSpot Server VM is:

jre/bin/server/jvm.dll (on x86)

jre/bin/server/jvm.dll (on IA64)

The corresponding locations in the Java 2 Runtime Environment begin with j2re1.4.2 instead of jre. The Exact VM and Classic VM are no longer part of the Java 2 SDK, and existing code that uses the Invocation API to launch an application based on old paths to the Exact or Classic VMs will not work.

Troubleshooting the Installation

Below are some tips for working around problems that are sometimes seen during or following an installation. For more troubleshooting information, see the Java FAQ.

  • If Netscape 6.2.x fails to launch a 1.4.2 applet and you installed 1.4.2 after you installed 1.4 (and both are still installed), do either of the following:

    1. Uninstall 1.4 before you install 1.4.2;
    2. Before you install 1.4.2, open the 1.4 Java Plug-in Control Panel, select the Browser tab, and deselect Netscape 6.
  • If you see the following error message about Microsoft Windows Installer 2.0:
    An error occured while downloading the file
    http://www.installengine.com/Msiengine20/instmsiw.exe.
    What would you like to do?

    When installing version 1.4.2 of Java 2 Runtime Environment or Java 2 SDK (using the default minimized download rather than the single executable), InstallShield requires Microsoft Windows Installer 2.0 to be on your machine; if it is not found (or an older version is found), then InstallShield automatically tries to download Microsoft Windows Installer 2.0. If your machine is not on the Internet or is behind an authenticated proxy, the installation will fail at that point. To proceed, simply use the Windows Offline Installer from the download page. Microsoft Windows Installer 2.0 is included in this download. Alternatively, you can manually download Microsoft Windows Installer 2.0 by going to microsoft.com and searching for "Windows Installer 2.0". Version 2.0 of Microsoft Windows Installer is included in Windows XP and Windows 2000 Service Pack 3, but not in earlier versions of Windows.

    • To see which version of Microsoft Windows Installer is installed, do the following:

      1. Locate the file MSI.DLL. (Usually located in C:\WINNT\SYSTEM32 )
      2. Select the file and right-click on it.
      3. Choose "Properties" and click on the "Version" tab.

  • If you get an error about one of the following during InstallShield setup:
      1. Error extracting support files. A typical error message is An Installation support file could not be installed. The filename, directory or volume label syntax is incorrect.
      2. Error installing Ikernel.exe (0x any number)
      3. Access is denied
      4. Error loading Type Library/DLL

    These errors could be caused by a known problem with InstallShield. See the InstallShield web site for a discussion of this problem with possible solutions: http://support.installshield.com/kb/view.asp?pcode=ALL&articleid=Q1049

If you see the following error message:

The InstallShield engine (iKernel.exe) could not be launched.
Error loading type library/DLL

This message probably indicates that system file Stdole32.tlb is missing from your computer. You can obtain this file from the Microsoft web site. For Microsoft Windows 98 platforms, for example, this file is included in the DCOM98 product.

  • If you see the following error message on Microsoft Windows 2000

    config.nt. The system file is not suitable for running MS-DOS
    and Microsoft Windows Application
  • it indicates a problem with the %SystemRoot%\System32\COMMAND.COM file that has been seen on some installations of Microsoft Windows 2000. If you encounter this error message when you try to launch the installer, consult the Microsoft web site at: http://support.microsoft.com/support/kb/articles/Q142/2/71.asp

    for information about resolving the problem.

    If you see the following error message

    corrupt cabinet fil, then the file you have downloaded is corrupted. (A cabinet file contains compressed application, data, resource and DLL files.) Check its file size against the expected file size listed in these instructions. If they don't match, try downloading the bundle again.

    If you see the following error message

    System Error during Decompression, then you might not have enough space on the disk that contains your TEMP directory.

    If you see the following error message

    This program cannot be run in DOS mode, then do the following:

      1. Open the MS-DOS shell or Command Prompt window
      2. Right-click on the title bar
      3. Select Properties
      4. Choose the Program tab
      5. Push the Advanced button
      6. Make sure the item "Prevent MS-DOS-based programs from detecting Windows" is unchecked
      7. Select OK
      8. Select OK again
      9. Exit the MS-DOS shell
      10. Restart your computer.

    Private vs. public J2RE - Installing the Java 2 SDK installs a private Java 2 Runtime Environment and optionally a public copy. The private J2RE is required to run the tools included with the Java 2 SDK. It has no registry settings and is contained entirely in a jre directory (typically at C:\Program Files\j2sdk1.4.2\jre) whose location is known only to the SDK. On the other hand, the public J2RE can be used by other Java applications, is contained outside the SDK (typically at C:\Program Files\Java\j2re1.4.2), is registered with the Windows registry (at HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft), can be removed using Add/Remove Programs, might or might not be registered with browsers, and might or might not have java.exe copied to the Windows system directory (making it the default system Java platform or not).

    • Creating source files in Notepad - In Microsoft Windows, when you create a new file in Microsoft Notepad and then save it for the first time, Notepad normally adds the .txt extension to the filename. Therefore, a file you name Test.java is saved as Test.java.txt. It's important to note that you cannot see the .txt extension unless you turn on the viewing of file extensions (in Microsoft Windows Explorer, uncheck "Hide file extensions for known file types" under Folder Options). To prevent the .txt extension, enclose the filename in quotation marks, such as "Test.java", when typing it into the Save As dialog box.

    • On the other hand, Microsoft WordPad does not add a file extension if you provide one -- you must save the file as "Text Document".

      Choosing an installation path containing characters that are not part of the system code page - On Windows 2000, XP, and 2003, it is possible to name directories using characters that are not part of the system locale's code page. If such a directory is part of the installation path, then error 1722 occurs, and installation is not completed.

    • To prevent this problem, make sure that the user and system locales are identical, and that the installation path only contains characters that are part of the system locale's code page. User and system locales can be set in the Regional Options or Regional Settings control panel

Friday, August 15, 2008

A Simple JSP

Okay, playing with the examples can be fun (spoiler: the two colours you're looking for are Black and Cyan), but the real test is to set up a JSP of your own and make it run.


Open NotePad or your favourite text editor, and type in the following:


This example brought to you by JSP and SitePoint.com!


Save the file as theEnd.html in a new subdirectory of Tomcat's webapps directory called sitepoint. Create a second new file in NotePad and type in the following:


<%@ page language="Java" %>

<html>

<head>

<title>A Simple JSP</title>

</head>

<body>

<p>

 <% String num = request.getParameter("num");

    if (num == null) { // No number specified

      // Display the form

 %>

      <form action="<%= HttpUtils.getRequestURL(request) %>">

      What should I count to? <input type="text" size="2" name="num" />

      <input type="submit" />

      </form>

 <%

    } else for (int i=1; i<=Integer.parseInt(num); i++) {

 %>

      Counting: <%= i %><br />

 <% }

 %>

</p>



<%@ include file="theEnd.html" %>



</body>

</html>


Save this as count.jsp in your new sitepoint directory alongside theEnd.html.


Now, to make these two files visible, you need to create a Java Web application to contain them. Doing this is nice and simple. Create a subdirectory of your new sitepoint directory called WEB-INF. In that subdirectory, create a text file called web.xml and type the following into it:


<?xml version="1.0" encoding="ISO-8859-1"?>



<!DOCTYPE web-app

   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

   "http://java.sun.com/dtd/web-app_2_3.dtd">



<web-app>

</web-app>


Save the file and then restart Tomcat or reboot your system to allow Tomcat to become aware of the new Web application. You can then view the page through Tomcat with the URL http://localhost:8080/sitepoint/count.jsp.


To make your new Web application visible through Apache, simply restart Apache. When you restarted Tomcat, it created a new automatic configuration file for Apache; restarting Apache will read in this new config file and add your new Web application to the lineup. Whenever you add a new Web application to Tomcat you need to perform this "Restart Tomcat, Restart Apache" process; fortunately, this doesn't happen often.


Once Apache is back up and running, open http://localhost/sitepoint/count.jsp. There you have it: your first working JSP in Apache!

JSP Quick-Start Guide for Linux

Downloading and Installing Tomcat


Since Apache doesn't support JSP out of the box, we need to add something else to the mix to provide that support. Unfortunately, JSP is too complicated to be supported by a simple Apache module; thus, we need to install an entirely new program to provide that support, then instruct Apache to forward requests for JSP pages to that program (note: this may sound like CGI, but it isn't; just wait and see). The program we'll be using is called Tomcat, and is also written by the Apache Group.


Tomcat is in fact a simple Web server in its own right. It doesn't support any of the advanced features of Apache, however; that's not its job! By linking Tomcat and Apache together, you get a system that provides full support for JSP (thanks to Tomcat) while maintaining the performance and expandability (PHP, Perl, SSL, etc.) of Apache.


Your first step should be to download and install the Java 2 Software Development Kit (Java 2 SDK) from Sun. This is required both to run Tomcat (which is a Java program), and for Tomcat to be able to compile JSPs for use. The current version of the Java 2 SDK (also called the JDK) as of this writing is version 1.4.1_01, and is available for download here. Download the ~42MB "Linux self-extracting file" (be sure to download the SDK, not the JRE!). The filename should be j2sdk-1_4_1_01-linux-i586.bin. Extract this file into your /usr/local directory with this series of commands:


[kevin@sp kevin]$ su

Password: ********

[root@sp kevin]# chmod u+x j2sdk-1_4_1_01-linux-i586.bin

[root@sp kevin]# mv j2sdk-1_4_1_01-linux-i586.bin /usr/local/

[root@sp kevin]# cd /usr/local

[root@sp local]# ./j2sdk-1_4_1_01-linux-i586.bin


You can delete the j2sdk-1_4_1_01-linux-i586.bin file now, or put it someplace safe for future use; you're done with it.


Java is now installed, but you need to do a few things to settle it smoothly into your system. First, make a symbolic link so you can access the Java installation with the easier-to-type name /usr/local/java:


[root@sp local]# ln -s j2sdk1.4.1_01 java


Next, make links to the important programs that make up the Java SDK in the /usr/local/bin directory, so you can run them from anywhere:


[root@sp local]# ln -s java/bin/java /usr/local/bin/java

[root@sp local]# ln -s java/bin/javac /usr/local/bin/java

[root@sp local]# ln -s java/bin/jar /usr/local/bin/java


Now, we need to edit a couple of environment variables on your system. Still as root, open the /etc/profile on your system in your preferred text editor. Look for a line beginning with PATH=. When you type a program name at the command prompt, this line sets the directories that your system checks for that program. Check to make sure /usr/local/bin is in the list. If it isn't, add the following line right after the existing PATH= line:


PATH="$PATH:/usr/local/bin"


You also need to set the JAVA_HOME environment variable to point to your Java installation. To do this, scroll right down to the bottom of the file and add these two lines to the end:


JAVA_HOME="/usr/local/java"

export JAVA_HOME


Save the changes, log out, and then log back in. Java should now be nicely installed and integrated with your system. To test it, you can type java -version at the command prompt and make sure that it reports your Java version correctly.


Now you're ready to install Tomcat. Download the latest release from the Jakarta Project Web site. As of this writing, the latest version was 4.1.18, and was available at http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.18/bin/. The file should be called jakarta-tomcat-4.1.18-LE-jdk14.tar.gz, and is about 5.1MB.


Once you've downloaded the file, move it to your /usr/local directory and extract it:


[kevin@sp kevin]$ su

Password: ********

[root@sp kevin]# mv jakarta-tomcat-4.1.18-LE-jdk14.tar.gz /usr/local/

[root@sp local]# tar xfz jakarta-tomcat-4.1.18-LE-jdk14.tar.gz


You can delete the jakarta-tomcat-4.1.18-LE-jdk14.tar.gz file now, or put it somewhere safe for future use; you're done with it.


As with the Java SDK, create a link to the installation directory with a neater name for convenience:


[root@sp local]# ln -s jakarta-tomcat-4.1.18-LE-jdk14 tomcat


Like Java, Tomcat requires an environment variable of its own to be set for it to run properly. Open up your /etc/profile file one more time and add these two lines to the end:


CATALINA_HOME="/usr/local/tomcat"

export CATALINA_HOME


Once again, save your changes, log out, then log back in for changes to take effect.


You're ready to start Tomcat! Log in as root and type the following command to launch it:


[root@sp kevin]# $CATALINA_HOME/bin/startup.sh


If all goes well, the startup.sh script should display the values of a few environment variables, and then Tomcat will launch quietly in the background. Congrats -- Tomcat is up and running!


As I said before, Tomcat provides its own simple Web server, and we can use this to test that it is working properly. Tomcat's Web server is set up to use port 8080 by default, so open your Web browser and load http://localhost:8080/. You should see the Tomcat home page, with links to some examples that come preinstalled on the server.


Have a play with these examples if you're curious, and notice how the JSP examples take considerable time to load the first time you use them, but then work very quickly upon subsequent accesses. This happens because the first time a JSP page is accessed, Tomcat needs to compile it into a Java Servlet, which is a piece of pure Java code that can be run very quickly to process requests. That Servlet is then held in memory to process subsequent requests for the same JSP at blazing speed.


When you're done playing with Tomcat, shut it down by running the shutdown.sh script the same way you ran the startup.sh script above ($CATALINA_HOME/bin/shutdown.sh). Tomcat will shut down after a few moments.


Running Tomcat Automatically

If you've got Apache running automatically at system start-up, you'll probably want to do the same for Tomcat. Start by copying (not linking) the catalina.sh script that came with Tomcat to your /etc/init.d/ directory:


[root@sp kevin]# cd /etc

[root@sp etc]# cp /usr/local/tomcat/bin/catalina.sh init.d/


This script relies on the JAVA_HOME and CATALINA_HOME environment variables we set earlier, but these variables do not exist while the system is starting up. We must therefore edit the script a little so that it can serve as a system startup script.


Open the file in your favourite text editor, and scroll down to the first blank line following the opening comments (any line that begins with a # is a comment). Add these two lines at that point:


JAVA_HOME="/usr/local/java"

CATALINA_HOME="/usr/local/tomcat"


This script actually makes an attempt at detecting CATALINA_HOME itself, but this attempt backfires if the script is not actually in the Tomcat directory (which in this case it isn't). Scroll down and look for a line that begins with CATALINA_HOME=. It should look like this:


CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`


Comment it out by putting a # at the start of that line:


#CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`


That completes the adjustments to catalina.sh. You can now assign this as a start-up script in the various runlevels (operating modes) of your computer:


[root@sp etc]# ln -s init.d/catalina.sh rc2.d/S90tomcat

[root@sp etc]# ln -s init.d/catalina.sh rc3.d/S90tomcat

[root@sp etc]# ln -s init.d/catalina.sh rc4.d/S90tomcat

[root@sp etc]# ln -s init.d/catalina.sh rc5.d/S90tomcat

[root@sp etc]# ln -s init.d/catalina.sh rc0.d/K19tomcat


That should do it! To try it out, shut down your computer, start it back up again, and see if you can load the Tomcat home page at http://localhost:8080/.


 

Server-Side Java with the Struts Framework on Mac OS X

Struts helps you organize your Java-based web applications by providing a framework based on a version of the Model-View-Controller design pattern. With Struts (or more formally, the Jakarta Project’s Struts Framework), you can combine Servlets, JSP, custom Struts tag libraries and other components using a unified framework that helps you design, create, and deploy stable web applications quickly. It requires a bit more work initially, to set everything up, but the value of the framework is realized later, when the ordered and componentized nature of your code lets you maintain, update, and reuse it easily.

Design Patterns and the Model-View-Controller Pattern

Design patterns are conceptual structures that you can use to better organize how you think about, plan, and talk about your code. Many applications, especially web applications, have core elements in common. Design patterns give developers a shared vocabulary, can help keep us from re-inventing versions of the same solutions for each new application.

Apple’s development environments have used the Model-View-Controller pattern for many years. Apple’s documentation includes a discussion of how the Model-View-Controller applies to Cocoa applications.

The Model-View-Controller pattern is used (whether implicitly or explicitly) in nearly every sophisticated web application. It’s a sensible way to organize your application architecture. Simply put, the Model is your data and your application logic, the View corresponds to your presentation elements (HTML, JSP, display beans, etc.), and the Controller(s) handle the application’s flow.


Installing and Using Struts on Mac OS X

To complete the installation steps below, you’ll need items on the Apple Developer Tools CD. So if you haven’t installed it yet, do so now.

To obtain Struts, go to http://jakarta.apache.org/struts/acquiring.html. In these examples, I’m using the current binary distribution, which at the time of this writing is 1.1. If you’re using a later version, then, of course, you’ll have to change some of the paths in the commands below.

First, use curl to download the Struts archive:

liz@localhost:/usr/local/src> curl -O  
http://jakarta.apache.org/builds/jakarta-struts/release/v1.1/jakarta-struts-1.1.tar.gz

Next, extract the files using gnutar. The version of tar shipped with Mac OS X frequently does not work with tarfiles from the Apache project, but gnutar always will.

liz@localhost:/usr/local/src> gnutar -xzvf jakarta-struts-1.1.tar.gz

Before installing, check Jakarta’s list of prerequisites to make sure you have everything you need.

Struts requires a Java2 Java Development Kit - version 1.2 or later. Since you have installed the Apple Developer Tools, you’re all set. Struts also requires a servlet container. I’ve chosen to use the Apache Project’s Tomcat servlet container, and to run it as a stand-alone server for simplicity’s sake. At the time of this writing, the latest stable version was 4.1.24, although another major version is on the horizion. No matter which version you use, your installation process should be much like mine below.

Since the recent Developer Tools include a JDK greater than 1.4 (type java -version to find out which you have), I can install a lightweight version of Tomcat. I want the server to live under /usr/local/tomcat/, and the source tarball to stay in /usr/local/src.

liz@localhost:/usr/local/src> curl -O http://jakarta.apache.org/builds/jakarta-tomcat-4.0
/release/v4.1.24/bin/jakarta-tomcat-4.1.24-LE-jdk14.tar.gz
liz@localhost:/usr/local/src> gnutar -xzvf jakarta-tomcat-4.1.24-LE-jdk14.tar.gz
liz@localhost:/usr/local/src> sudo mkdir /usr/local/tomcat
Password:
liz@localhost:/usr/local/src> sudo mv jakarta-tomcat-4.1.24-LE-jdk14 /usr/local/tomcat
liz@localhost:/usr/local/src> export
CATALINA_HOME=/usr/local/tomcat/jakarta-tomcat-4.1.24-LE-jdk14
liz@localhost:/usr/local/src> cd $CATALINA_HOME/bin
liz@localhost:/usr/local/tomcat/jakarta-tomcat-4.1.24-LE-jdk14/bin> ./startup.sh

Now I can confirm that Tomcat is running on port 8080 on my local machine by going to http://localhost:8080 in a browser:

The next prerequisite is the Ant build system. Note that I’m still using gnutar to extract files, and not Apple’s standard tar executable. I’m installing Ant under /usr/local/ant, and adding its binary files directory to my $PATH environment variable.

liz@localhost:/usr/local/src> curl -O
http://apache.mirrorcentral.com/dist/ant/binaries/apache-ant-1.5.3-1-bin.tar.gz
liz@localhost:/usr/local/src> gnutar -xzvf apache-ant-1.5.3-1-bin.tar.gz
liz@localhost:/usr/local/src> sudo mkdir /usr/local/ant
liz@localhost:/usr/local/src> sudo mv apache-ant-1.5.3-1 /usr/local/ant/
liz@localhost:/usr/local/src> export ANT_HOME=/usr/local/ant/apache-ant-1.5.3-
liz@localhost:/usr/local/src> export PATH=$PATH:$ANT_HOME/bin/

At this point, if you’ve been following along with me, you’ve set up two environment variables ($CATALINA_HOME and $ANT_HOME) and changed one ($PATH). When you exit your terminal session, these variables will go away. No fun. You’ll probably want to set up a shell startup file that loads these variables for you on each new terminal session. Since I use the bash shell, my startup file lives in /Users/liz/.bash_profile and looks (in part) like this:

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices 
export JAVA_HOME=/usr
export PS1="\u@\h:\w> "

Since I wanted to keep the new environment variables for future use, I changed my .bash_profile to contain the lines below. You can also see that I added aliases for starting and stopping tomcat.

export ANT_HOME=/usr/local/ant/apache-ant-1.5.3-1 
export CATALINA_HOME=/usr/local/tomcat/jakarta-tomcat-4.1.24-LE-jdk14
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:
/System/Library/CoreServices:$ANT_HOME/bin
export JAVA_HOME=/usr
alias start_tomcat='$CATALINA_HOME/bin/startup.sh'
alias stop_tomcat='$CATALINA_HOME/bin/shutdown.sh'

If you’re using the bash shell, you can copy and use this file as is. Otherwise, see the manpage for your favorite shell program (for example, man tcsh). To use bash and the .bash_profile file I’m using, open the Terminal application, click Preferences, and set your preferences to be like these:

It’s finally time to install Struts itself. The version of Tomcat I’m using comes with an integrated version of Struts. Still, there are some tag library descriptors and example files that I want to install. Note: If you aren’t using Tomcat (or if you’re using an older version of Tomcat without Struts), follow the Struts installation guide. You’ll just have to copy a few extra files - it’s not much harder.

Here are the commands I used to add the extra Struts files to my new Tomcat installation. Again, if you aren’t using Tomcat with Struts built-in, see the installation link in the line above.

liz@localhost:~> stop_tomcat 
liz@localhost:~> cd /usr/local/src/jakarta-struts-1.1
liz@localhost:/usr/local/src/jakarta-struts-1.1>
cp lib/*.tld $CATALINA_HOME/server/webapps/admin/WEB-INF/
liz@localhost:/usr/local/src/jakarta-struts-1.1>
cp webapps/*.war $CATALINA_HOME/webapps
liz@localhost:/usr/local/src/jakarta-struts-1.1> start_tomcat

With that step completed, you should be able to view the example applications (which came bundled in those .war files referenced above). For example, look at http://localhost:8080/struts-example/index.jsp

”Hello World”

Now we can build a “hello world” mini-application, using a few Struts components. Since the setup process is fairly complicated, this simple application won’t take advantage of many of Struts’ useful features. I’ll focus on those in the next section.

One of the .war files in your Struts source directory is called struts-blank.war. This file is meant to serve as a template for new Struts applications. I want to extract the archive so I can modify it to make my own simple “Hello World” application. So I copy struts-blank.war into a new empty folder, and type jar -xf struts-blank.war. Here are the contents:

You can see that the archive includes the struts.jar file (necessary for any Struts application), some tag libraries, the standard web.xml and manifest files, and a configuration file called struts-config.xml. This config file is actually functionally empty, but it includes lots of useful examples in commented sections.

Let’s look at the other two files in the archive. First, the index.jsp file that comes with the blank Struts application. In this file, you can see the Struts tag libraries in use. (If you aren’t familiar with the taglibs concept yet, you may want to read Sun’s explanation.) One interesting thing to note is that all the English text on the page is stored separately and presented via a custom tag. While this is by no means required in a Struts application, it does simplify Internationalization or text changes. You don’t need to touch any Java components in order to alter the page copy.

<%@ page language="java" %>   
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html locale="true">
<head>
<title><bean:message key="index.title"/></title>
<html:base/> </head> <body bgcolor="white">
<logic:notPresent name="org.apache.struts.action.MESSAGE" scope="application">
<font color="red">
ERROR: Application resources not loaded -- check servlet container
logs for error messages.
</font>
</logic:notPresent>
<h3><bean:message key="index.heading"/></h3>
<p><bean:message key="index.message"/></p>
</body>
</html:html>

The copy for the file above is stored in ApplicationResources.properties. Since I’m making my own application, I’ll start by altering that text. Here are the contents of my new properties file:

index.title=My Own Hello World, Using Struts  index.heading=Heya

Next, I want to make a simple Java Bean that my application can reference. It’s about as simple as a Bean gets - it stores a hard-coded Magic Number, and tells the user whether or not they guessed that number correctly.

package foo;   
public class GuessBean
{
public int magicNumber;
public GuessBean()
{
this.magicNumber = 2;
}
public String evaluateGuess(int g)
{
if (g == this.magicNumber)
{
return "You guessed it!";
}
else
{
return "Sorry, wrong number.";
}
}
}

Now I can edit the index.jsp file and add a basic form, and create a new file called guess.jsp which calls the bean’s evaluateGuess() method. (You can find those files in the hello.war archive.)

The final step is to create a build.xml file that Ant can use to bundle the all application’s files into a WAR archive, and deploy them to Tomcat. If you are using a Java IDE that can build WAR files for you, you won’t need to bother with this section. Otherwise, here’s the build file:

<project name="hello world" default="build-all" basedir=".">     
<property environment="env"/>
<property name="appname" value="hello"/>
<property name="src.dir" value="${basedir}/WEB-INF/src"/>
<property name="app.name" value="hello"/>
<property name="app.path" value="/${app.name}"/>
<property name="app.version" value="0.1-dev"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="classes.dir" value="${basedir}/WEB-INF/classes"/>
<property name="tomcat.home" value="${env.CATALINA_HOME}"/>
<property name="servlet.jar" value="${tomcat.home}/common/lib/servlet.jar"/>
<property name="deploy.dir" value="${tomcat.home}/webapps"/>
<path id="build.path">
<fileset dir="./WEB-INF/lib/">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${src.dir}"/>
<pathelement path="${servlet.jar}"/>
<pathelement path="${classes.dir}"/>
</path>
<target name="cleanlocal">
<delete dir="${build.dir}" includeEmptyDirs="true" />
<delete file="${appname}.war" />
<mkdir dir="${build.dir}"/>
</target>
<target name="compile">
<javac srcdir="${src.dir}" destdir="${classes.dir}" debug="on" deprecation="on">
<include name="**/*.java"/>
<classpath refid="build.path"/>
</javac>
</target>
<target name="cleanserver">
<delete file="${deploy.dir}/${appname}.war" />
<delete dir="${deploy.dir}/${appname}" includeEmptyDirs="true" />
</target>
<target name="war">
<war warfile="${appname}.war" webxml="./WEB-INF/web.xml">
<fileset dir="./" includes="**/*.*" excludes="*.war, **/*.nbattrs,
.xml, **/WEB-INF/**/*.*, **/project-files/**/*.*"/>
<webinf dir="./WEB-INF" includes="**/*" excludes="web.xml,
**/*.jar, **/*.class"/>
<lib dir="./WEB-INF/lib"/>
<classes dir="${classes.dir}" cludes="**/*.properties, **/*.class" />
</war>
</target>
<target name="build-all" depends="cleanlocal, cleanserver, compile, war">
<copy file="${appname}.war" todir="${tomcat.home}/webapps"/>
</target>
</project>

To deploy my new application, I simply need to run Ant and restart Tomcat.

liz@localhost:~/hello> ant  liz@localhost:~/hello> stop_tomcat 
liz@localhost:~/hello> start_tomcat

Sample Application: A RSS Newsfeed Consolidator

Many news sites and weblogs make their headlines available as RSS feeds. The RSS format is (more-or-less standardized) XML, generally made available over HTTP. You can read more about RSS, for example, on the O’Reilly xml.com site and the webreference.com site (and elsewhere).

In this section, I’ll show you how you can use Servlets, JSP, and Struts to create an application that will allow a user to log in, assemble a list of weblogs and/or news sites, and read headlines fetched and displayed by the application. Headlines are links to the remote content. For simplicity’s sake, I’ve left off several real-world aspects of the application, most notably the database backend. User data is simply stored in the session, and vanishes when the user closes their browser or you re-start Tomcat.

Let’s look at the application with the Model-View-Controller design paradigm in mind. In this case, the model is the session data plus the application logic. The view corresponds to the JSP pages and beans used for display, and the controller is a special SiteAction class. The SiteAction class is a subclass of a Struts Action class, and it is responsible for handling user input and dispatching requests to the correct places. Here’s an overview of the files which make up the application. (You can download the WAR file and a tarball of the whole application.)


In this application, I want to take advantage of a few of Struts’ cooler features. For instance, I can create custom Form Beans and tie them to Action objects. Let’s start with a Form Bean. The bean’s properties map to form fields, and each property has appropriately-named accessor methods.

package foo;   
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
public final class SiteForm extends ActionForm
{
private String index = null;
private String url = null;
private String title = null;
private String dispatch = null;
// accessor methods
public void setUrl(String url)
{
this.url = url;
}
public void setTitle(String title)
{
this.title = title;
}
public void setIndex(String index)
{
this.index = index;
}
public void setDispatch(String dispatch)
{
this.dispatch = dispatch;
}
public String getUrl()
{
return (this.url);
}
public String getTitle()
{
return (this.title);
}
public String getIndex()
{
return (this.index);
}
public String getDispatch()
{
return (this.dispatch);
}
public void reset(ActionMapping mapping, HttpServletRequest request)
{
this.url = null;
this.title = null;
this.index = null;
}
// for this application, we aren't validating user input, but you could easily extend
this method to do form validation public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
{
// I'm leaving this example code in place so you can
see how form validation would be done using Struts
ActionErrors errors = new ActionErrors();
// if (url == null)
// errors.add("url", new ActionError("error.url.required"));
return errors;
}

One of the most interesting things about Struts is its set of Action classes. The code below extends the Struts Action class, and uses simple conditionals to dispatch user requests. There are other kinds of Action classes, notably DispatchAction, which you can read about in the Struts user guide and on Ted Husted’s husted.com.

// this controller responds to user input, handles it, and redirects  
// to a location specified in struts-config.xml package foo;
import java.io.IOException; import java.util.Vector;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
public final class SiteAction extends Action
{
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
ActionErrors errors = new ActionErrors();
// get the RSS Site List object from the session,
or create a new one if necessary
HttpSession session = request.getSession();
SiteList siteList = (SiteList)session.getAttribute("siteList");
if (siteList == null)
{
siteList = new SiteList();
}
String dispatch = ((SiteForm) form).getDispatch();
String forward = "alter";
if ("add".equals(dispatch))
{
String url = ((SiteForm) form).getUrl();
String title = ((SiteForm) form).getTitle();
if (url != null && title != null)
{
SiteListItem it = new SiteListItem();
it.setURL(url);
it.setTitle(title);
siteList.addSite(it);
}
}
else if ("show".equals(dispatch))
{
String index = ((SiteForm) form).getIndex();
if (index != null)
{
// put the selected site index in the
session for use by the next page
session.setAttribute("siteIndex",index);
forward = "view";
}
}
else if ("delete".equals(dispatch))
{
String index = ((SiteForm) form).getIndex();
if (index != null)
{
int ind = Integer.parseInt(index);
siteList.removeSite(ind);
}
}
// Forward to the specified success URL
return (mapping.findForward(forward));
}
}

At this point, we tie the Action and Form objects together using directives in struts-config.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>   
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<!-- ========== Form Bean Definitions =================================== -->
<form-beans>
<!-- our SiteList controller -->
<form-bean name="SiteForm" type="foo.SiteForm"/>
</form-beans>
<!-- ========== Action Mapping Definitions ============================== -->
<action-mappings>
<action path="/siteAction" type="foo.SiteAction" name="SiteForm">
<forward name="alter" path="/index.jsp"/>
<forward name="view" path="/show.jsp"/>
</action>
</action-mappings>
</struts-config

Now we can use Struts to create a JSP page with user input elements that call the SiteAction object.

<%@ page language="java" %> 
<%@ page import="foo.SiteListItem" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<head>
<title>Manage Sites</title>
<html:base/>
</head>
<body bgcolor="white">
<logic:notPresent name="org.apache.struts.action.MESSAGE" scope="application">
<font color="red">
ERROR: Application resources not loaded -- check servlet container
logs for error messages.</font>
</logic:notPresent> <br />
<jsp:useBean id="login" scope="session" class="foo.LoginBean" />
<jsp:useBean id="siteList" scope="session" class="foo.SiteList" />
<h1>RSS Site Manager</h1>
<%// user validation is being handled by a session bean if (login.validate() == false)
{
out.println("<script language=\"javascript\">
document.location='/headlines/login.jsp'</script>");
return;
}
int size = siteList.getSize();
for (int i=0; i < size; i++)
{
SiteListItem it = siteList.getItemAt(i);
out.println("<a href=\"/headlines/siteAction.do?dispatch=show&index="
+ i + "\">" + it.getTitle() + "
</a><br>");
}
%>
<br>
<hr>
<h2>Add a Site</h2>
<html:form type="foo.SiteAction" name="SiteForm" action="/siteAction.do" focus="url">
<table border="0"><tr>
<td>RSS URL</td>
<td><input type="text" name="url" size="60"/></td> </tr> <tr>
<td>Title</td> <td><input type="text" name="title" size="60"/></td>
</tr> <tr> <td colspan="2"> <input type="submit" value="Submit"/></td> </tr>
</table> <input type="hidden" name="dispatch" value="add"> </html:form> </body>
</html:html>

These files work together with beans that store and parse the list of RSS links and manage user login. Those helper objects are available in the tar archive. Note that in a production-quality application, user logins would have been handled by an Action object instead of the lightweight bean I’m using for example purposes.


With all these pieces assembled, you can compile and deploy the application using the same build.xml file referenced above. Just change the project name and appname at the top of the file, and you’re good to go. Here’s the RSS manager in action:


Conclusion, and Suggestions for Further Reading

This article has given you the information you need to get up and running with Struts on Mac OS X. Still, there’s much more to Struts than I can cover in one article. If you’re interested in learning more, visit the Struts User Guide. You might also want to pick up Programming Jakarta Struts, by Chuck Cavaness, or Struts in Action, by Ted Husted. Finally, I would be remiss in not recommending the now-classic book Design Patterns: Elements of Reusable Object-Oriented Software by Gamma, Helm, Johnson, and Vlissides.

Wednesday, August 13, 2008

DragonForce - Cry For Eternity


 

Music & Lyrics: Sam Totman Falling from the sky now, the sign of the burning sun Into the face of the evil one Nowhere to hide now we're on the run Right before your eyes We're watching, we're waiting, our souls are forsaken The sign of the warriors, the evil will rise Through the fire and

Read More

DragonForce - Valley of the Damned


 

On a cold dark winter night, hidden by the stormy light A battle rages for the right, for what will become In the valley of the damned, a warrior with sword in hand He travels fast

Read More

DragonForce - Heart of Dragon


 

Proud and so glorious Standing the four of us Our swords will shine bright in the sky When united we come To the land of the sun With the heart of a dragon we ride

Read More

DragonForce - Black Winter Night


 

Day after day as I bodies slay And the sun becomes dark in the sky Everything's lost for this human race And the dawn of a new age will rise Rays of sunlight now are gone

• Read More

Tuesday, August 12, 2008

Drogon Force - Black Fire


 

We come from... Over the dark horizon sky With twisted tales of sacrifice To imagine or believe all the glory of the free Hunting all day an endless cry The things I've seen I can't deny Sinners, saints all mixed in one The dawn of time has begun Why can't you see what they're doing to me? Is it fair that I'm dying in vain...?

Read More

Sunday, August 10, 2008

The Guitar hero for REAL men! Banjo Hero



 

DragonForce shmagonforce! What would those overrated girly men know about some hot banjo-on-banjo action? Nothing, thats what! Behold the redneck's gift to music the way it was originally meant to be seen: in Guitar Hero. If this doesn't make you want to go into the mountains with a bow and arrow and kill people, I don't know what will.


Watch

Totally metal hack allows custom Guitar Hero II songs


 

The folks over at the Scorehero forums are at it again, hacking their way through Guitar Hero II. This time, they've managed to replace songs found in the game with custom songs, new note charts and all. A huge list of custom songs (including tunes by TOOL, Dragonforce, Metallica, Journey, and more) can be found.


Guitar Hero - Dragonforce - Through Fire and Flames on Expert!!!

 

Most ridiculous song ever! Must Watch!


Watch

A Guitar Hero God plays "Through the Fire and Flames" by Dragonforce

 

He was sent from heaven for the purpose of playing Guitar Hero.


Watch

Dragonforce's Song On Guitar Hero III - Fuck You That's Impossible

 
Here is the first look at Dragonforce’s song “Through the Fire and the Flames” for Guitar Hero III. Seriously, that shit’s impossible.

Friday, August 8, 2008

Scour.com - Search Better and earn $$$



Search Google/Yahoo/MSN from one place and earn points redeemable for VISa gift cards at scour.com

Cristiano Ronaldo - Amazing Soccer compliation


Inspiring and incredible footage of Cristiana Ronaldo displaying all of his legendary freeystyle skills.
Watch

Wednesday, August 6, 2008

Google AdSense Program Policies

Publishers participating in the AdSense program are required to adhere to the following policies. We ask that you read these policies carefully and refer to this document often. If you fail to comply with these policies, we may disable ad serving to your site and/or disable your AdSense account. While in many cases we prefer to work with publishers to achieve policy compliance, we reserve the right to disable any account at any time. If your account is disabled, you will not be eligible for further participation in the AdSense program.

Please note that we may change our policies at any time, and pursuant to our Terms and Conditions, it is your responsibility to keep up to date with and adhere to the policies posted here.

Invalid Clicks and Impressions

Clicks on Google ads must result from genuine user interest. Any method that artificially generates clicks or impressions on your Google ads is strictly prohibited. These prohibited methods include but are not limited to repeated manual clicks or impressions, using robots, automated click and impression generating tools, third-party services that generate clicks or impressions such as paid-to-click, paid-to-surf, autosurf, and click-exchange programs, or any deceptive software. Please note that clicking on your own ads for any reason is prohibited. Failure to comply with this policy may lead to your account being disabled.

Encouraging clicks

In order to ensure a good experience for users and advertisers, publishers may not request that users click the ads on their sites or rely on deceptive implementation methods to obtain clicks. Publishers participating in the AdSense program:

  • May not encourage users to click the Google ads by using phrases such as "click the ads," "support us," "visit these links," or other similar language
  • May not direct user attention to the ads via arrows or other graphical gimmicks
  • May not place misleading images alongside individual ads
  • May not promote sites displaying ads through unsolicited mass emails or unwanted advertisements on third-party websites
  • May not compensate users for viewing ads or performing searches, or promise compensation to a third party for such behavior
  • May not place misleading labels above Google ad units - for instance, ads may be labeled "Sponsored Links" but not "Favorite Sites"
Site Content

While Google offers broad access to a variety of content in the search index, publishers in the AdSense program may only place Google ads on sites that adhere to our content guidelines, and ads must not be displayed on any page with content primarily in an unsupported language. View a list of supported languages.

Sites displaying Google ads may not include:

  • Violent content, racial intolerance, or advocacy against any individual, group, or organization
  • Pornography, adult, or mature content
  • Hacking/cracking content
  • Illicit drugs and drug paraphernalia
  • Excessive profanity
  • Gambling or casino-related content
  • Content regarding programs which compensate users for clicking on ads or offers, performing searches, surfing websites, or reading emails
  • Excessive, repetitive, or irrelevant keywords in the content or code of web pages
  • Deceptive or manipulative content or construction to improve your site's search engine ranking, e.g., your site's PageRank
  • Sales or promotion of weapons or ammunition (e.g., firearms, fighting knives, stun guns)
  • Sales or promotion of beer or hard alcohol
  • Sales or promotion of tobacco or tobacco-related products
  • Sales or promotion of prescription drugs
  • Sales or promotion of products that are replicas or imitations of designer goods
  • Sales or distribution of term papers or student essays
  • Any other content that is illegal, promotes illegal activity, or infringes on the legal rights of others
Copyrighted Material

Website publishers may not display Google ads on web pages with content protected by copyright law unless they have the necessary legal rights to display that content. Please see our DMCA policy for more information.

Webmaster Guidelines

AdSense publishers are required to adhere to the webmaster quality guidelines posted at http://www.google.com/webmasters/guidelines.html.

Site and Ad Behavior

Sites showing Google ads should be easy for users to navigate and should not contain excessive pop-ups. AdSense code may not be altered, nor may standard ad behavior be manipulated in any way that is not explicitly permitted by Google.

  • Sites showing Google ads may not contain pop-ups or pop-unders that interfere with site navigation, change user preferences, or initiate downloads.
  • Any AdSense code must be pasted directly into webpages without modification. AdSense participants are not allowed to alter any portion of the code or change the behavior, targeting, or delivery of ads. For instance, clicks on Google ads may not result in a new browser window being launched.
  • A site or third party cannot display our ads, search box, search results, or referral buttons as a result of the actions of any software application such as a toolbar.
  • No AdSense code may be integrated into a software application.
  • Webpages containing AdSense code may not be loaded by any software that can trigger pop-ups, redirect users to unwanted websites, modify browser settings, or otherwise interfere with site navigation. It is your responsibility to ensure that no ad network or affiliate uses such methods to direct traffic to pages that contain your AdSense code.
  • Referral offerings must be made without any obligation or requirement to end users. Publishers may not solicit email addresses from users in conjunction with AdSense referral units.
  • Publishers using online advertising to drive traffic to pages showing Google ads must comply with the spirit of Google's Landing Page Quality Guidelines. For instance, if you advertise for sites participating in the AdSense program, the advertising should not be deceptive to users.
Ad Placement

AdSense offers a number of ad formats and advertising products. Publishers are encouraged to experiment with a variety of placements, provided the following policies are respected:

  • Up to three ad units may be displayed on each page.
  • A maximum of two Google AdSense for search boxes may be placed on a page.
  • Up to three link units may also be placed on each page.
  • Up to three referral units may be displayed on a page, in addition to the ad units, search boxes, and link units specified above.
  • AdSense for search results pages may show only a single ad link unit in addition to the ads Google serves with the search results. No other ads may be displayed on your search results page.
  • No Google ad or Google search box may be displayed in a pop-up, pop-under, or in an email.
  • Elements on a page must not obscure any portion of the ads.
  • No Google ad may be placed on any non-content-based pages.
  • No Google ad may be placed on pages published specifically for the purpose of showing ads, whether or not the page content is relevant.
Competitive Ads and Services

In order to prevent user confusion, we do not permit Google ads or search boxes to be published on websites that also contain other ads or services formatted to use the same layout and colors as the Google ads or search boxes on that site. Although you may sell ads directly on your site, it is your responsibility to ensure these ads cannot be confused with Google ads.

Product-Specific Policies

Some AdSense products have additional policies that apply specifically to their use. Please review them in full if you use the products listed below.