Matt RaibleMatt Raible is a writer with a passion for software. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

[Denver JUG] The J2EE 1.4 Web Foundation: Servlets and JSPs

I'm sitting in the Qwest Auditorium right now, in the heart of downtown Denver. It's 7:20 p.m. and Sue Spielman is getting ready to launch her presentation on J2EE 1.4. There is a gentleman who is trying to start a JBoss Special Interest Group - if you live in Denver and are interested - send an e-mail to the DJUG mailing list. I've been here since 5:45 (after driving an hour from DTC) so this better be good. ;-) The Eclipse in Action speaker (David Gallardo) is coming to speak in October. In September, the author of AspectJ is coming in conjunction with Grady Booch. Never heard of him, but judging from the applause - I'm living under a rock.

On with the presentation. Sue thinks that J2EE 1.4 will be released towards the end of this year. Damn, I was hoping for the end of the summer.

What's new in Servlets 2.4?

1. Platform Requirements:

  • HTTP/1.1 - New static constants. HttpServletResponse.SC_FOUND to represent status code 302 instead of HttpSerlvetResponse.SC_MOVED_TEMPORARILY.
  • J2SE 1.3

2. DTD to XML Schemas:

  • Provides easier way to define element structure, element ordering structure is arbitrary under <web-app>
  • New elements in 2.4 XSD: <env-entry>, <resource-ref>, <resource-env-ref>, <jsp-config>

3. Complete event listener lifecycle:

  • New Request Events. Be aware that distributed containers handle listeners a bit different (1 instance per JVM).
    • ServletContext - manage, startup/shutdown, attribute changes
    • HttpSession - creation, invalidation, attribute changes, migration if sessions distributed
    • Request - request coming in or out of scope in a web component, attribute changes
  • javax.servlet.ServletRequestEvent, ServletRequestAttributeEvent
  • new interfaces ServletRequestListener, ServletRequestAttributeListener
  • SessionActivationListener is what you'd use for serializing sessions across a cluster

4. Filter enhancements:

  • Ability to configure filters to be invoked under request dispatcher. What does "under the Request Dispatcher mean?" It means that you can apply filters under RequestDispatcher forward() and include() calls. Defined in web.xml:
  • <dispatcher>REQUEST</dispatcher> and/or FORWARD, INCLUDE, ERROR (REQUEST was the only option in Servlets 2.3)
  • Example: if you have INCLUDE - a request doesn't invoke the filter, a forward doesn't invoke the filter, but an include would.

5. Enhancements for i18n:

  • Two new methods: setCharacterEncoding(String encoding) - do before getWriter() and getContentType().
  • <locale-encoding-mapping-list> - new element in the XSD to provide the deployer with the ability to assign locale-to-charset mappings outside servlet code.
<locale-encoding-mapping>
  <locale>en</locale>
  <encoding>en_US</encoding>
</locale-encoding-mapping>
  • Response encoding for English locales will default to US English (as opposed to the "other" English from Great Britain) ;-)

6. API Improvements added to the ServletRequest to help handle proxy servers: getLocalAddr(), getLocalName(), getLocalPort(), getRemotePort().

7. Other improvements:

  • Distributed sessions must throw an IllegalArgumentException if an object placed in the session can't be serialized
  • Relationship b/w session invalidate/timeout clarified (can now set zero or negative values in <session-timeout>)
  • Deprecation of Single ThreadModel (never used it - did you?)

8. Misc. Clarifications:

  • Welcome files can be servlets
  • Any library files exposed by the container apart from the WEB-INF structure must be loaded by the same classloader w/in any single JVM.
    • Examples include the JARs Tomcat loads from $CATALINA_HOME/shared/lib
    • This should help in avoiding potential ClassCastExceptions

As I expected, there still is now way to get the user's requested URL with container managed authentication. Damn.


JSP 2.0

1. Simplifies tag extension protocol

  • SimpleTag interface: doTag(), Tag attribute methods, NO scriplet code allowed
  • SimpleTagSupport class, implements SimpleTag, adds convenience methods: public JspFragment getJspBody(), public JspTag getParentTag()

2. Relationships: .tag file mechanism allows page authors to use JSP syntax to write custom actions

  • Use directive standard syntax: <%@ tag %> instead of <%@ page %>
  • JSP compiler generates custom action code (look in Tomcat's work directory)
  • Flexible packaging:
    • drop .tag file into WEB-INF/tags
    • implicit tag library generation
    • can still write a TLD if you want, or TLD in a JAR file

3. EL Functions: simple function invocations, defined in tag libraries, but it's a fair amount of work - like writing a TLD file and .java source file.

4. Expression Language:

  • . and [] operations access JavaBean properties and Collection elements
  • ${books.title}, ${books[title]}, ${books["JSTL Practical Guide"]}
  • Automatic type conversion
  • Ability to specify defaults (i.e. in case of null)
  • EL can access Cookies, request params, headers, scope variables and others

5. XML-based JSPs:

  • .jspx and .tagx for pure XML versions
  • no more <jsp:root> just use namespace: xmlns:jsp=http://www.sun.com/JSP/Page
  • For full list of XML features - see section 6.

JSTL (Java Standard Tag Library)

  • Over 42 standard custom actions available for common tasks needed by page authors
  • JSTL will become rev 1.1 in the J2EE 1.4 release

1. Core features:

  • Control flow: for each, conditionals
  • URL management: encoding, ftp, http
  • Formatting and i18n: date, time, numbers, locales
  • XML: transformations and XPath
  • Database support: queries, data sources, transactions
  • 4 custom action libraries: core, xml, i18n formatting, sql.

Man, Sue really knows her stuff. This was a very enjoyable presentation for me and I'm glad I came. Too bad JSPs can't be used as templates like Velocity - that would be sweet! Of course, I like Velocity and it is easy to use - but I've never implemented it from scratch. I do hope to in Moblogger and Struts Menu, but who knows when that will happen.

Update (7/17/2003): Presentation slides from this are now available for download:

  • July 9 - Basic Concepts: Scott Davis Apache Xerces - XML Parse (PowerPoint and samples)
  • July 9 - Main Speaker: Sue Spielman J2EE 1.4 Web Foundation (PowerPoint)

Posted in Java at Jul 09 2003, 11:15:44 PM MDT Add a Comment

RE: .Mac Bookmarks

.Mac Bookmarks seems like a good idea. I tried it, and it is cool, but it's not what I'm looking for. I have enough open windows as it is - another one only makes it more difficult. I need my bookmarks to be a part of my browser, like they currently are. That's what I like. What I want is the ability to specify a URL to my bookmarks.html file. My favorite browsers, Firebird and Camino both use a local bookmarks.html file, so this would work perfectly. I don't need bookmarks when I'm not on the net, so there would be no issues (for me) with connectivity.

I got the tip off for .Mac Bookmarks from Erik.

Posted in The Web at Jul 09 2003, 03:30:47 PM MDT 1 Comment

Good JUG Meetings this week in Colorado

Tonight in Denver - Celebrating DJUG's award as a top 25 user group, Apache Xerces, and The J2EE 1.4 Web Foundation. Meeting starts at 5:30 and ends around 9:00. I'm going.

Tomorrow in Boulder - Web Frameworks by Kris Thompson. This presentation will cover a basic understanding of what in general a web framework is and then cover on overview of some of the more popular frameworks out there. I want to go, but squeezing 40 hours in a 3 1/2 day week will prevent me.

Posted in Java at Jul 09 2003, 07:01:16 AM MDT Add a Comment

Pictures from the Cabin

We had an awesome time at the cabin this 4th of July, as evidenced by the many photos I snapped. Enjoy!

Seeley Lake through my sunglasses Abbie and I at the beautiful Holland Lake

Posted in General at Jul 09 2003, 05:57:36 AM MDT Add a Comment

Good Presos from TSS Symposium

I found a few good presentations in my Inbox today. I read them. Usually I don't. I enjoyed them, especially Mike's. I think WW2 looks promising, and I expect that I will try it soon. I predict that I will like it and I will be enthusiastic about it. Many hours will be lost exploring it's codebase and questioning it's authors. Julie will long for me to come to bed, but I will stay up and educate myself. This doesn't sound like any fun at the moment. So I will control my curiousity for another day. Hopefully I can control it for another month or year.

Posted in Java at Jul 08 2003, 04:20:44 PM MDT 3 Comments

Back from the Cabin

I just flew in from Montana this morning - and boy does it suck to be back. Being back in Denver isn't so bad, it's sitting at the keyboard, programming Java, reading weblogs/e-mail and being stuck in an office while summer is going on! Man is it beautiful outside right now. And it's even nicer in Montana. 5 days of laughing, sleeping, rafting, playing frisbee, BBQ-ing, friends and the wonderful sun makes it very hard to come back to this thing I despise today - work.

Sure it'll be fun in a day or so when I start becoming a part of this digital world again - through responding to e-mails and updating this site - but right now - bbblllllllllaaaaahhhh!!! Give me a beer and a lawn chair and put me back on vacation - that's where I belong - on the front porch of the cabin, with Abbie on my lap - listening to the birds chirping and watching the deer tiptoe through the garden below. Rafting down the crystal green river on the Middle Fork of the Flathead. There's nothing like summer in Montana.

Posted in General at Jul 08 2003, 02:35:29 PM MDT 1 Comment

My Love-Hate Relationship with Apple

I admit that I have a love/hate relationship with Apple. I love iPhoto and how well it works with my Canon Powershot G2 (digital camera). Same goes for iTunes/iPod and iMovie/our Sony DV camera. I hate how slow my Powerbook is (667 MHz, 1 GB RAM). I hate that iTunes and iPhoto will just "quit working" sometimes and I have to backup/re-import in order to get things working again. I love the look of OS X and hate the fact that the machine has a 1-button mouse. Don't get me wrong, I love/hate things about Windows/Linux too, but I have an intense desire to really love Macs. Mine just keeps disappointing me.

Twice now, I've thought I lost all my photos and music - errors like "we've lost all your data" and "can't read file that was working 2 minutes ago" stare at me with a smirk and a middle finger. The data I have in iTunes and iPhoto is the most valuable data I have. I could lose the hard drive on my Windows box and not be that disappointed, but the Mac - whoof! Pictures of Abbie, all my CDs I've imported, we're talking 10 GB of kick ass data!!

Apple Music Store Last night, I hated OS X since iTunes flipped me off and I spent an hour+ getting it back. This morning, I fell in love again as I bought my first album (Def Leppard, Hysteria) from the Apple Music Store. Man that was easy. I've been meaning to stop by Best Buy and get a couple new CDs. Now it's possible in under 30 seconds without leaving my keyboard monkey role. Sweet!

I'm going to have to leave Mini-me at home during vacation though - I don't want to have a fight while I'm trying to enjoy Montana. Our flight leaves at 8:30 tonight, so don't expect any updates until next Tuesday. I'll be taking lots of pictures (the 512MB flash card that Abbie got me for Christmas will be a big help). Happy 4th - don't blow off any fingers.

Posted in Mac OS X at Jul 02 2003, 11:41:57 AM MDT 4 Comments

GoogleAds

Reading Russ mentioning GoogleAds in his blog got me thinking ... i get a lot of referers from google searches so i was thinking let's see if i can get this site to be accepted. Since the rules to get accepted are not disclosed it is a bit of a gamble. [Werner Ramaekers Weblog]

Hmmm, I wonder if I could qualify? I wonder if it's possible (in Roller) to only display these ads when a user is coming from Google. I don't want to spam all my readers with GoogleAds, but if someone is coming from Google - I don't mind. Ideas appreciated.

Posted in Roller at Jul 02 2003, 07:39:28 AM MDT Add a Comment



Posted in General at Jul 01 2003, 09:27:29 PM MDT Add a Comment

Over the Lake



Posted in General at Jul 01 2003, 09:27:21 PM MDT Add a Comment