GWT 1.5 M2

http://code.google.com/p/google-web-toolkit/downloads/list?can=4&q=version:1.5


As an Amazon Associate I earn from qualifying purchases.

GWT 1.5 M2

http://code.google.com/p/google-web-toolkit/downloads/list?can=4&q=version:1.5


As an Amazon Associate I earn from qualifying purchases.

Eclipse Members Order

This is not strictly a "Best Practice" topic, but since it is very important to keep code uniform on the project with multiple developers I require that every one Formats and Orders Java classes this way:




As an Amazon Associate I earn from qualifying purchases.

Eclipse Members Order

This is not strictly a "Best Practice" topic, but since it is very important to keep code uniform on the project with multiple developers I require that everyone Formats and Orders Java classes this way:




As an Amazon Associate I earn from qualifying purchases.

Building a sailing canoe for Everglades

http://paulsedwick.com/


As an Amazon Associate I earn from qualifying purchases.

MyEclipse Memory

To modify memory for myEclipse go to: Windows --> Preferences --> Edit --> Default VM argument
-Xms128m -Xmx256m -XX:PermSize=128m -XX:MaxPermSize=512m -Dfile.encoding=UTF-8


As an Amazon Associate I earn from qualifying purchases.

MyEclipse Memory

To modify memory for myEclipse go to: Windows --> Preferences --> Edit --> Default VM argument
-Xms128m -Xmx256m -XX:PermSize=128m -XX:MaxPermSize=512m -Dfile.encoding=UTF-8


As an Amazon Associate I earn from qualifying purchases.

Daily Trigger

Trigger trigger = TriggerUtils.makeDailyTrigger(22, 02); trigger.setName("newsRoomTrigger");


As an Amazon Associate I earn from qualifying purchases.

Daily Trigger

Trigger trigger = TriggerUtils.makeDailyTrigger(22, 02); trigger.setName("newsRoomTrigger");


As an Amazon Associate I earn from qualifying purchases.

Animal learning



As an Amazon Associate I earn from qualifying purchases.

Adventure Trimaran 24

Check out this video on YouTube:

http://www.youtube.com/watch?v=cBxcbS1oNhM



As an Amazon Associate I earn from qualifying purchases.

ultimate sailing

Check out this video on YouTube:

http://www.youtube.com/watch?v=QZDS3miKQCc



As an Amazon Associate I earn from qualifying purchases.

Hydrovisions Raptor 16

Check out this video on YouTube:

http://www.youtube.com/watch?v=6I_7uDYg0QQ



As an Amazon Associate I earn from qualifying purchases.

The proa Toroa

Check out this video on YouTube:

http://www.youtube.com/watch?v=a4FADWXmuHk



As an Amazon Associate I earn from qualifying purchases.

Micronesia Sailing

Check out this video on YouTube:

http://www.youtube.com/watch?v=-EVV5BGXFho
Check out this video on YouTube:

http://www.youtube.com/watch?v=-EVV5BGXFho
Check out this video on YouTube:

http://www.youtube.com/watch?v=-EVV5BGXFho



As an Amazon Associate I earn from qualifying purchases.

Taka-san



As an Amazon Associate I earn from qualifying purchases.

Start of the JPMorgan Chase run Chicago

This year there were the record 23,000 people participating.


As an Amazon Associate I earn from qualifying purchases.

Lili biking



As an Amazon Associate I earn from qualifying purchases.

Lili biking



As an Amazon Associate I earn from qualifying purchases.

GWT: running tests filtered by Maven 2

<target name="war" depends="clean">
<echo>Maven Executable: ${MAVEN_EXEC}</echo>
<exec dir="${basedir}" executable="${MAVEN_EXEC}">
<arg line="clean compile war:war -Dtarget=${TARGET}" />
</exec>
<delete file=".\\target\\csd.war" />
</target>

<target name="prep_test" depends="war">
<copyfile dest=".\\src\\main\\resources\\applicationContext_test.xml" src="${WAR_EXPLODED}\\WEB-INF\\classes\\applicationContext.xml" />
</target>


<target name="test" depends="prep_test">
<echo>Maven Executable: ${MAVEN_EXEC}</echo>
<exec dir="${basedir}" executable="${MAVEN_EXEC}">
<arg line="compile test -Dtarget=${TARGET}" />
</exec>
</target>




public abstract class TestCaseSpringAutoWire extends AbstractTransactionalDataSourceSpringContextTests implements Constants
{
    protected String[] getConfigLocations()
    {
setAutowireMode(AUTOWIRE_BY_NAME);
return new String[] { "classpath:applicationContext_test.xml" };
    }
}







As an Amazon Associate I earn from qualifying purchases.

GWT: running tests filtered by Maven 2

<target name="war" depends="clean">
<echo>Maven Executable: ${MAVEN_EXEC}</echo>
<exec dir="${basedir}" executable="${MAVEN_EXEC}">
<arg line="clean compile war:war -Dtarget=${TARGET}" />
</exec>
<delete file=".\\target\\csd.war" />
</target>

<target name="prep_test" depends="war">
<copyfile dest=".\\src\\main\\resources\\applicationContext_test.xml" src="${WAR_EXPLODED}\\WEB-INF\\classes\\applicationContext.xml" />
</target>


<target name="test" depends="prep_test">
<echo>Maven Executable: ${MAVEN_EXEC}</echo>
<exec dir="${basedir}" executable="${MAVEN_EXEC}">
<arg line="compile test -Dtarget=${TARGET}" />
</exec>
</target>




public abstract class TestCaseSpringAutoWire extends AbstractTransactionalDataSourceSpringContextTests implements Constants
{
    protected String[] getConfigLocations()
    {
setAutowireMode(AUTOWIRE_BY_NAME);
return new String[] { "classpath:applicationContext_test.xml" };
    }
}







As an Amazon Associate I earn from qualifying purchases.

GWT: building war with Maven 2 and Ant and deploying to Tomcat - single click

<project name="csd" default="prep_deploy" basedir=".">


<property name="WAR_EXPLODED" value=".\\target\\csd" />

<echo>

ATTENTION! CREATE FOLLOWING FILE IF MISSING:

.\\src\\main\\resources\\${user.name}.properties 

echo>

<property file=".\\src\\main\\resources\\${user.name}.properties" />


<target name="clean">

<delete dir="com.ucc.csd.CSD" />

<delete dir="www" />

<delete dir="target" />

<delete dir="bin" />

<delete dir="target-eclipse" />

<delete dir="tomcat" />

<echo>Refresh your Eclipse project (F5)echo>

target>


<target name="war" depends="clean">

<echo>Maven Executable: ${MAVEN_EXEC}echo>

<exec taskname="mvn war" dir="${basedir}" executable="${MAVEN_EXEC}">

<arg line="clean compile war:war -Dtarget=${TARGET}" />

exec>

<delete file=".\\target\\csd.war" />

target>


<target name="hibernate_hbm_to_ddl" depends="clean">

<echo>Maven Executable: ${MAVEN_EXEC}echo>

<exec taskname="mvn hbm2ddl" dir="${basedir}" executable="${MAVEN_EXEC}">

<arg line="clean compile hibernate3:hbm2ddl -Dtarget=${TARGET}" />

exec>

<delete file=".\\target\\csd.war" />

target>


<target name="prep_test" depends="war">

<copy file=".\\target\\classes\\applicationContext.xml" tofile=".\\src\\main\\resources\\applicationContext_test.xml" />

target>


<target name="test" depends="prep_test">

<echo>Maven Executable: ${MAVEN_EXEC}echo>

<exec taskname="mvn test" dir="${basedir}" executable="${MAVEN_EXEC}">

<arg line="test -Dtarget=${TARGET}" />

exec>

target>


<target name="gwt_shell" depends="war">

<echo>GWT: starting hosted (dev)echo>

<java taskname="GWT hosted" classpathref="class_path" classname="com.google.gwt.dev.GWTShell" fork="true" maxmemory="256m">

<jvmarg line="-verbose ${JVM_ARG_START}" />

<arg line="-out www com.ucc.csd.CSD/CSD.html" />

java>

target>


<target name="gwt_compile_to_js" depends="war">

<java taskname="GWT compile" classpathref="class_path" classname="com.google.gwt.dev.GWTCompiler" fork="true" maxmemory="512m">

<jvmarg line="-verbose ${JVM_ARG_START}" />

<arg line="-logLevel WARN -out www com.ucc.csd.CSD" />

java>

target>


<target name="prep_deploy" depends="gwt_compile_to_js">

<copy todir="${WAR_EXPLODED}">

<fileset dir="www/com.ucc.csd.CSD" />

copy>

<copy file=".\\src\\com\\ucc\\csd\\CSD.gwt.xml" todir="${WAR_EXPLODED}\\WEB-INF\\classes\\com\\ucc\\csd" />

target>


<target name="deploy_locally" depends="prep_deploy">

<echo>DID YOU STOP TOMCAT?echo>

<delete dir="${DEPLOY_DIR}" />

<copy todir="${DEPLOY_DIR}">

<fileset dir="${WAR_EXPLODED}" />

copy>

<echo>START YOUR TOMCATecho>

target>


<path id="class_path">

<pathelement path=".\\src" />

<pathelement path=".\\src\\main\\java" />

<pathelement path=".\\target\\classes\\" />

<fileset dir="${GWT_HOME}">

<include name="*.jar" />

fileset>

<fileset dir="${WAR_EXPLODED}\\WEB-INF\\lib">

<include name="*.jar" />

fileset>

path>


project>



As an Amazon Associate I earn from qualifying purchases.

GWT: building war with Maven 2 and Ant and deploying to Tomcat - single click

<project name="csd" default="prep_deploy" basedir=".">


<property name="WAR_EXPLODED" value=".\\target\\csd" />

<echo>

ATTENTION! CREATE FOLLOWING FILE IF MISSING:

.\\src\\main\\resources\\${user.name}.properties 

</echo>

<property file=".\\src\\main\\resources\\${user.name}.properties" />


<target name="clean">

<delete dir="com.ucc.csd.CSD" />

<delete dir="www" />

<delete dir="target" />

<delete dir="bin" />

<delete dir="target-eclipse" />

<delete dir="tomcat" />

<echo>Refresh your Eclipse project (F5)</echo>

</target>


<target name="war" depends="clean">

<echo>Maven Executable: ${MAVEN_EXEC}</echo>

<exec taskname="mvn war" dir="${basedir}" executable="${MAVEN_EXEC}">

<arg line="clean compile war:war -Dtarget=${TARGET}" />

</exec>

<delete file=".\\target\\csd.war" />

</target>


<target name="hibernate_hbm_to_ddl" depends="clean">

<echo>Maven Executable: ${MAVEN_EXEC}</echo>

<exec taskname="mvn hbm2ddl" dir="${basedir}" executable="${MAVEN_EXEC}">

<arg line="clean compile hibernate3:hbm2ddl -Dtarget=${TARGET}" />

</exec>

<delete file=".\\target\\csd.war" />

</target>


<target name="prep_test" depends="war">

<copy file=".\\target\\classes\\applicationContext.xml" tofile=".\\src\\main\\resources\\applicationContext_test.xml" />

</target>


<target name="test" depends="prep_test">

<echo>Maven Executable: ${MAVEN_EXEC}</echo>

<exec taskname="mvn test" dir="${basedir}" executable="${MAVEN_EXEC}">

<arg line="test -Dtarget=${TARGET}" />

</exec>

</target>


<target name="gwt_shell" depends="war">

<echo>GWT: starting hosted (dev)</echo>

<java taskname="GWT hosted" classpathref="class_path" classname="com.google.gwt.dev.GWTShell" fork="true" maxmemory="256m">

<jvmarg line="-verbose ${JVM_ARG_START}" />

<arg line="-out www com.ucc.csd.CSD/CSD.html" />

</java>

</target>


<target name="gwt_compile_to_js" depends="war">

<java taskname="GWT compile" classpathref="class_path" classname="com.google.gwt.dev.GWTCompiler" fork="true" maxmemory="512m">

<jvmarg line="-verbose ${JVM_ARG_START}" />

<arg line="-logLevel WARN -out www com.ucc.csd.CSD" />

</java>

</target>


<target name="prep_deploy" depends="gwt_compile_to_js">

<copy todir="${WAR_EXPLODED}">

<fileset dir="www/com.ucc.csd.CSD" />

</copy>

<copy file=".\\src\\com\\ucc\\csd\\CSD.gwt.xml" todir="${WAR_EXPLODED}\\WEB-INF\\classes\\com\\ucc\\csd" />

</target>


<target name="deploy_locally" depends="prep_deploy">

<echo>DID YOU STOP TOMCAT?</echo>

<delete dir="${DEPLOY_DIR}" />

<copy todir="${DEPLOY_DIR}">

<fileset dir="${WAR_EXPLODED}" />

</copy>

<echo>START YOUR TOMCAT</echo>

</target>


<path id="class_path">

<pathelement path=".\\src" />

<pathelement path=".\\src\\main\\java" />

<pathelement path=".\\target\\classes\\" />

<fileset dir="${GWT_HOME}">

<include name="*.jar" />

</fileset>

<fileset dir="${WAR_EXPLODED}\\WEB-INF\\lib">

<include name="*.jar" />

</fileset>

</path>


</project>



As an Amazon Associate I earn from qualifying purchases.

UNIX ln -s, or link command

$ sudo ln -s /opt/apache/apache-tomcat-5.5.17 /usr/local/tomcat
Password:
$ cd /usr/local/tomcat/webapps/
uki@MacBookPro:/usr/local/tomcat/webapps $ pwd
/usr/local/tomcat/webapps


As an Amazon Associate I earn from qualifying purchases.

UNIX ln -s, or link command

$ sudo ln -s /opt/apache/apache-tomcat-5.5.17 /usr/local/tomcat
Password:
$ cd /usr/local/tomcat/webapps/
uki@MacBookPro:/usr/local/tomcat/webapps $ pwd
/usr/local/tomcat/webapps


As an Amazon Associate I earn from qualifying purchases.

Email validations

private boolean isEmailBad(String email) { String emailChars = "@."; if (email.indexOf(emailChars) == 1){ log.warn("Email address does not contains @ and . charachters"); } if (email == null || email.length() < 5) { log.warn("Invalid email address length"); return true; } return false; }


As an Amazon Associate I earn from qualifying purchases.

Email validations

private boolean isEmailBad(String email) { String emailChars = "@."; if (email.indexOf(emailChars) == 1){ log.warn("Email address does not contains @ and . charachters"); } if (email == null || email.length() < 5) { log.warn("Invalid email address length"); return true; } return false; }


As an Amazon Associate I earn from qualifying purchases.

GWTShell arguments

[java] Google Web Toolkit 1.4.61
[java] GWTShell [-port port-number | "auto"] [-noserver] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logLevel level] [-gen dir] [-out dir] [-style style] [url]
[java] where
[java] -port Runs an embedded Tomcat instance on the specified port (defaults to 8888)
[java] -noserver Prevents the embedded Tomcat server from running, even if a port is specified
[java] -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated)
[java] -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated)
[java] -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
[java] -gen The directory into which generated files will be written for review
[java] -out The directory to write output files into (defaults to current)
[java] -style Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF)
[java] and
[java] url Automatically launches the specified URL


As an Amazon Associate I earn from qualifying purchases.

GWTShell arguments

[java] Google Web Toolkit 1.4.61
[java] GWTShell [-port port-number | "auto"] [-noserver] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logLevel level] [-gen dir] [-out dir] [-style style] [url]
[java] where
[java] -port Runs an embedded Tomcat instance on the specified port (defaults to 8888)
[java] -noserver Prevents the embedded Tomcat server from running, even if a port is specified
[java] -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated)
[java] -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated)
[java] -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
[java] -gen The directory into which generated files will be written for review
[java] -out The directory to write output files into (defaults to current)
[java] -style Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF)
[java] and
[java] url Automatically launches the specified URL


As an Amazon Associate I earn from qualifying purchases.

Post Scriptum

The views in this article are mine and do not reflect those of my employer.
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
LinkedIn
Google Scholar

Popular Recent Posts

Most Popular Articles

apt quotation..