Java

Spring Framework’s WebDataBinder

Last week, I was just outside our nation’s capital teaching Spring Web MVC Framework to a wonderful group of people working for the National Institute of Health (NIH).  They are getting ready to move a collection of Struts 1 projects to Spring Web MVC.  Some questions and discoveries around Spring Web MVC’s @InitBinder operations seemed a good fit for this week’s post. Spring Web MVC Command Beans Part of my Spring MVC class is dedicated to teaching students how to… Read More

Intertech’s Complete Raspberry Pi Materials – Lab 9

Almost there!  All month, Intertech has been giving away the class material’s to the Complete Raspberry Pi training class and today I present you with Lab 9 of 10. These last two labs are pretty cool!  In these last two labs, you hook up your Pi to some sensors to create a home weather kit. In particular, in Lab 9, you attach a photo cell sensor (shown in the picture here) to your Pi via breadboard.  A photocell is basically a… Read More

Intertech’s Complete Raspberry Pi Materials – Lab 8

            Today’s give away lab is a continuation of Lab 7′s simulated LED stoplight lab.  In today’s lab, you use a Java program and a Java library (Pi4J) to get feedback from a switch (what is called a momentary switch – shown above), to turn the stop light on and off.  Specifically in this lab, you: Connect a momentary switch to the breadboard. Explore a program to get input from a momentary switch connected by… Read More

Intertech’s Complete Raspberry Pi Materials – Lab 7

Today’s lab, and the remaining three labs in our free class materials give away, are all about hooking up your Raspberry Pi to external electronic equipment (LED’s, sensors, circuitry) and controlling that equipment.  In today’s Lab 7, you learn to control three LEDs (light emitting diodes) attached to the Pi’s GPIO (general purpose input/output) pins via breadboard wiring.  I call it the Pi “stoplight.”  You use the Java programming language to write a program to control the LED blinking. Specifically, the… Read More

Intertech’s Complete Raspberry Pi Materials – Lab 6

  Lab 6 of 10 is provided to you this Monday.  In this lab, you programmatically access and play music to the Pi’s audio jack.  You also learn some of the Linux configuration necessary to play MP3 (and other) files and you learn how to programmatically adjust the volume. Download Lab 6 from the Intertech Web site here:  http://www.intertech.com/downloads/CompleteRaspberryPi/CRPi-ch06-PlayAudio.docx. The prior labs are available from these posts: Lab 5 Lab 4 Lab 3 Lab 2 Lab 1 Materials    … Read More

How to use Spring’s WebApplicationInitializer

The DispatcherServlet has always served as the doorway component or “front controller” in a Spring Framework Web MVC application.  It’s job has been and still is to marshal requests to other components in the Spring MVC application backend and to orchestrate a response back to clients. DispatcherServlet and the web.xml Until Spring 3.1, the DispatcherServlet had to be registered with the Servlet container via the standard Web application web.xml file. The following elements had to be added to register the DispatcherServlet…. Read More

Intertech’s Complete Raspberry Pi Materials – Lab 5

  Today, I bring you lab 5 of 10 in our free give away of Intertech’s Raspberry Pi class materials.  Again, one of the great things I like about this device is that it is so inexpensive yet provides a great platform to experiment with all the same periphery equipment as you find on any computing system. In Lab 5 you explore how to use Java and the Pi’s connection capability to make Internet or other networking calls.  The Pi has a regular… Read More

Intertech’s Complete Raspberry Pi Materials – Lab 4

Continuing this month’s free class material give away, I bring you Lab 4 today.  In Lab 4, you explore the Raspbian Linux graphical user interface (called LXDE) and program a Java graphical user interface game application to run in LXDE.  Specifically, in this lab you: Explore a simple Java Swing application. Compile a Java Swing application. Try to run a Java Swing application in the CLI (command line interface). Run a Java Swing application in LXDE. Explore LXDE. Get Lab… Read More

Intertech’s Complete Raspberry Pi Materials – Lab 3

This month, Intertech is giving away my Complete Raspberry Pi class materials.  Raspberry Pi is a full computer in a small and affordable form.  Its a great tool for learning about computers and programming.  Today, I present you with Lab 3, but first, here are links to the first two blog posts and the link to the materials list post for those looking to get started with the Raspberry Pi. Lab 2 Lab 1 Materials Today’s lab, (Lab 3), is… Read More

Intertech’s Complete Raspberry Pi Materials – Lab 2

    Last week, I posted the first of what will be ten posts providing all the materials from our Complete Raspberry Pi training class.  Today, I give you Lab 2, which is about learning the basics of the Debian-derived Raspbian Linux OS.  In particular, this lab has you: Explore some of the background and origins of the Debian-derived Raspbian Linux OS. Learn some of the basic and important Linux commands. Learn how to start and stop LXDE. Learn how to safely shut… Read More