ECLIPSE and TOMCAT (web applications)

Apache Tomcat & Eclipse Platform make a great Web development platform. Tutorials about this development environment are available on the following websites:

I use the Tomcat version 5.5.23 as localhost because this version is available on my hosted website provided by my ISP Visual Online. My Eclipse version is Galileo (3.5.2). The Java SDK is 1.6.

Web applications are deployed on the Tomcat server with a WAR file (which stands for “web application archive” ) A WAR file is a ZIP file used to distribute a collection of JavaServer Pages, servlets, Java classes, XML files, tag libraries and static Web pages that together constitute the Web application.

There are special files and directories within a WAR file.

  • The /WEB-INF/classes directory contains the .class files (servlets, …)
  • The /WEB-INF/lib directory contains the .jar files with the Java librairies
  • The /WEB-INF directory contains a file named web.xml which defines the structure of the web application

The main elements of the web.xml file are shown below :

<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app id=”WebApp_ID” version=”2.4″ xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”>

<display-name>MyExampleWebProject</display-name>
<description>Describe What the application is doing and add comments</description>

<servlet>

<servlet-name>MyServlet</servlet-name>
<servlet-class>saraproft.com.servlet.FirstApp</servlet-class>
<description>Une application très simple</description>

<init-param>
<param-name>size</param-name>
<param-value>123</param-value>
</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>echo</url-pattern>
</servlet-mapping>

</web-app>

The elements of a web.xml file are :

  • the name of the application : <display name>
  • the name, class and parameters of the servlet : <servlet>
  • the mapping of the servlet : <servlet-mapping>
  • context parameters : <context-param>
  • session parameters : <session-config>
  • list of index files : <welcome-file-list>
  • MIME mapping : <mime-mapping>
  • other parameters referring to security, errors, filters, …

The other files (html, jsp, iamges, …) are stored in the root or in folders located in the root of the WAR file. They can’t be included in the WEB-INF directory.

Mise à jour de la firmware PSP 1004

last update : 3rd October 2010

Sony PSP

Aujourd’hui j’ai mis à jour la firmware de ma playstation portable (PSP) à la version 6.20. La procédure est la suivante:

  • Téléchargement du nouveau firmware : EBOOT.PBP
  • Connexion de la PSP au PC à l’aide du câble USB
  • Sélection du paramètre > [Connexion USB] dans le menu d’accueil
  • Appui sur la touche X pour activer le mode USB. Le PC reconnaît la PSP en tant que clé USB/disque dur externe
  • Ouverture du disque et installation du fichier EBOOT.PBP dans le dossier PSP/GAME/UPDATE
  • Déconnexion de la PSP du PC
  • Branchement du chargeur à la PSP
  • Appui sur la touche Cercle pour sortir du mode USB
  • Accès à Jeu > [Memory Stick]
  • Appui sur la touche Croix
  • Choix de la mise à jour puis validation avec la touche Croix
  • Suivi des instructions à l’écran pour terminer l’installation
  • Suppression du fichier EBOOT.PBP après la mise à jour

Note: si la batterie est faible, la mise à jour ne démarre pas, même si la console se trouve sur l’alimentation externe.

La mise à jour à la version 6.31 a été effectuée le 3 octobre 2010 avec succès par Internet sans passer par un PC.

PayPal Sandbox to test Express Checkout

The PayPal Sandbox allows developers to test the integration of their PayPal payment solution before submitting transactions to the live PayPal environment. The Sandbox is a duplicate of the live PayPal site, except that no real money changes hands.

The PayPal sandbox offers following functions:

  • Test Accounts : create preconfigured or  manual buyer and seller accounts. Virtual credit card numbers and bank accounts are generated automatically in the case of preconfigured accounts. In the case of manual account creation, a credit card number generator is needed to obtain valid virtual card numbers.  The expiration date can be freely chosen, the CVV is always 000.
  • Test Email : access emails sent to all the test accounts.
  • API Credentials : manage API credentials for the test accounts. The credentials are the API username and password and a digital signature.
  • Test Tools : Instant Payment Notification (IPN) simulator to initiate transactions to test the  (IPN) feature.
  • Additional resources : documentation, support, forums, developer network.

A Business account is needed to implement the PayPal Express Checkout gateway. The configuration is done in the profile menu. The name of the merchant and his secure merchant account ID and the following profile informations are managed in this section:

Account Information :
* Email, * Street Address, * Password, * Notifications, * Language Preference, * Time Zone, * Manage User, * API Access, * Business Information, * Identification Preference, * Merchant Fees

Financial Information :
# Credit/Debit Cards, # Bank Accounts, # Currency Balances, # Gifts and Discounts, # Recurring payments dashboard, # My preapproved payments

Selling Preferences :

  • Regional Tax : to set up domestic or international sales tax rates (handled in ZenCart for my store)
  • Shipping Calculations : to set up costs for shipping (handled in ZenCart for my store)
  • My Saved Buttons : to create new buttons or to change characteristics of existing buttons (not needed for my store)
  • Payment Receiving Preferences : to set up payment parameters (configuration needed for my store)
  • Instant Payment Notification Preferences : to activate IPN (IPN not handled by my store for Express Checkout)
  • Reputation : to cap seller reputation number (no for my store)
  • Customer Service Message : message displayed to customers before they open a dispute in the Resolution Center (edition needed for my store)
  • Website Payment Preferences : to set up payment preferences (configuration needed for my store)
  • Encrypted Payment Settings : to use certificates and encryption (analysis needed for my store)
  • Custom Payment Pages : to customize payment page (customization needed for my store)
  • Invoice Templates : to use templates for invoices (analysis needed for my store)
  • Language Encoding : to select the language to use on the website (english and utf-8 for my store)

Improve site page speed faster to load by removing extra loaded scripts

The Google websearch team just announced that they will now consider the speed it takes for a website to load when ranking it in Google search results on google.com.

”Site speed is just one of over 200 signals Google uses to determine search ranking, and because it’s a new signal, it doesn’t carry as much weight as the relevance of a page. In fact, less than 1% of all search queries on google.com are affected by the site speed signal”.

This factor may not play a major role now, but in future web consider this factor is going to have a great impact on web search results as it seems, so now it’s the time for all the webmasters our their to start thinking about their site page speed.

Google indicates the page performance in webmasters.google.com and recommends the open-source Firefox/Firebug Add-on Page Speed. Webmasters and web developers can use Page Speed to evaluate the performance of their web pages and to get suggestions on how to improve them.

Page Speed performs several tests on a site’s web server configuration and front-end code. These tests are based on a set of best practices known to enhance web page performance. Webmasters who run Page Speed on their pages get a set of scores for each page, as well as helpful suggestions on how to improve its performance.

14 rules for faster-loading web sites are described on the companion website of Steve Souders. These rules hev been tested on some of the most popular sites on the Internet and have successfully reduced the response times of those pages by 25-50%.

Combine Flashdevelop and TortoiseSVN

Flashdevelop has no integrated CVS or SVN file management. To do this is a huge task. The core FlashDevelop team can not start such a project and suggest to use Tortoise.

TortoiseSVN is a Subversion (SVN) client, implemented as a windows shell extension. It’s intuitive and easy to use, since it doesn’t require the Subversion command line client to run. The  version 1.6.7.  was released on january 23, 2010, the most recent version is 1.6.9 released on june 21, 2010.

Away3D source checkout with Tortoise

Dowloading svn files with Tortoise

Flashdevelop : open source Actionscript editor

Flashdeveloper screen snap

FlashDevelop is a popular open source ActionScript 2/3 and web development environment designed for Windows systems. FlashDevelop is built on the Scintilla editor component and is a Microsoft .NET 2.0 application. FlashDevelop was developed by the members of FlashDevelop.org in 2005 as an alternative to Adobe Flash.

FlashDevelop project is runned by two active members Mika Palmu (aka Meychi) and Philippe Elsass. Other developers like Nick Farino and Alessandro Crugnola have also contributed to the project.

The current version is 3.0.6 RTM was released on november 4, 2009.

Syntext Serna Free : Open Source XML Editor

Serna XML Editor

Serna Free XML editor is an easy-to-use open source WYSIWYG XML editor and probably the most powerful among free and open source XML editors for WYSIWYG authoring.

Serna free XML editor is available for all major platforms such as Microsoft Windows™ (2000, XP, Vista), Linux, Mac OS X, and Sun Solaris/SPARC. Version 4.2 was released on october 13, 2009.

Serna Free XML editor has been developed by SYNTEXT Inc., a private American software development company, founded in Seattle, Washington, in 1999. The company is focused on the development of state-of-the-art solutions for creating and maintaining complex XML content for various industries such as aerospace, software development, publishing, and others.

The company’s flagship is the Serna Enterprise XML editor which enables fully distributed collaborative XML authoring.

Reset the auto increment value for a MySQL table

To reset the auto increment value of a MySQL auto incremental primary key to a new value, either higher or lower than what it would otherwise next be, use the following command :

ALTER TABLE mytable AUTO_INCREMENT = xx

Its even more easy to change it in phpMyAdmin. Select mytable, click the “Operations” tab, change the displayed current next auto increment value and then click the “Execute” button.