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.
You searched this site for "java". 1,588 entries found.

You can also try this same search on Google.

NewsMonster 1.0 and Mozilla Application Development

I got a couple of treats from the XUL Announce mailing list this morning:

Kevin A. Burton (of Apache Jetspeed fame) has released NewsMonster 1.0 - a cross-plattform weblog manager with a brain - that runs inside Mozilla 1.0 (Netscape 7.0 or greater) on OS X, Linux, or Windows and showcases the power of XUL and Java.

Too bad it doesn't run on Mozilla Firebird. Oh well, I use NetNewsWire and believe it's the best aggregator out there.

O'Reilly has published an in-depth look at Mozilla's new roadmap titled "The Future of Mozilla Application Development" by David Boswell and Brian King.

If I could instantly learn anything right now, it would be XUL, Velocity and WebWork - in that order. I don't know what good this knowledge would do me, but it sure would be nice to learn stuff w/o even trying.

Posted in Java at Jul 10 2003, 06:43:59 AM MDT 2 Comments

[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

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

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

HowTo: JSP Progress Bars

As web interfaces become ubiquitous, more and more complex back-end processing is necessary. Of course, stateless HTTP leaves few ways to tell users what's going on. Andrei Cioroianu presents a JSP technique to display application "progress bars." [ONJava.com]

It's too bad there's so much scriplet action in this example, but the lesson is good. It'd be even nicer to see a JSTL port of this howto, or an alternate view approach (i.e. using Velocity or XML/XSL).

Posted in Java at Jun 30 2003, 06:32:03 AM MDT 4 Comments

[ANNOUNCE] Struts 1.1 Final Released!

The Struts team is proud, and extremely pleased, to announce the Final release of Struts 1.1. This release includes significant new functionality, as well as numerous fixes for bugs which were reported against the previous release, and supersedes the earlier 1.0.2 version as the latest official release of Struts from the Apache Software Foundation.

Download Binary | Download Source | JARs Only | Release Notes

test-all:                                                                                                               
                                                                                                                        
BUILD SUCCESSFUL                                                                                                        
Total time: 8 minutes 10 seconds                                                                                        
[minime:~/projects/appfuse] matt%   

Results look good!

Posted in Java at Jun 30 2003, 06:17:31 AM MDT Add a Comment

RE: J2SE 1.4.2 Released!

Thanks to Karl for tipping me off that JDK 1.4.2 has been released. [Download, Release Notes] Of course, I never would've known, except java.blogs told me. I downloaded, installed and changed my $JAVA_HOME to point to this sucker, then ran all my unit tests (flawlessly). It looks pretty damn good to me - just like an upgrade should be. Now where's J2EE 1.4?!

It doesn't look like Apple pulled off the simultaneous release it was hoping to. BTW, I've been doing a fair amount of development on my Mac lately with Eclipse 3.0 M1 - it's getting much, much better. Steve - if you release a 2 GHz PowerBook - I'll work overtime to buy that sucker.

Posted in Java at Jun 27 2003, 10:00:20 AM MDT 1 Comment

OWASP ~ The Open Web Application Security Project

I'm working on editing my Security Chapter (yet again) and I went to verify that a URL to http://www.owasp.org was still valid. There I found that they've developed an portal (based on Struts) with security as a REQUIREMENT, not an option.

OWASP

Several modules from the OWASP Common Library (OCL) are utilized as well ( OCL can be found in our CVS repository under the module name OCL ). Content is stored in XML format and translated with XSL.

Aside from the obvious need of a site for our own needs, the portal team has approached the design from the perspective that the OWASP portal should be more than a single use web application, but rather a reference implementation of a secure portal, that will rival the likes of any commercially available portal. We are striving to make the portal as extensible as possible, but yet deliver commonly needed feature sets. [http://beta.owasp.org]

Here's the best part: The portal that runs OWASP is open source and available for use in your own sites. Check out the release plan to see the planned and upcoming features for the next releases. It says it has RSS feeds, but I can't seem to find them.

Posted in Java at Jun 26 2003, 09:15:31 PM MDT Add a Comment

Struts 1.1 Final ~ might be released on Sunday

According to the struts-user mailing list, the Struts Dev Team is going to try and release 1.1 Final this weekend! Sweet!

From: Ted Husted
Subject: Re: [ANNOUNCEMENT] Struts 1.1 Release Candidate 2 released
Date: Wed, 25 Jun 2003 03:30:47 -0700 
-------------------------------------

Just a note on the RC2 status.

Martin posted the release vote for FileUpload on Monday, and there
are already 3 binding +1s. <yeah!/>

We've one outstanding Bugzilla ticket against RC2, which we should 
be able to either resolve or postpone. Given the imminent release 
of FU 1.0, I plan to post the Struts 1.1 Final Release vote 
tomorrow, so that we can roll it out on June 29. <double-yeah!/>

-Ted.

This doesn't mean much to me since the current RC2 release works fine for me (if I didn't, I'd use a nightly). However, it's cool that this is finally being released. It's too bad it took so long - such is the nature of open source - I probably won't release struts-resume 1.0 until 2004. And who knows when Roller 1.0 will be released...

Posted in Java at Jun 25 2003, 08:34:10 AM MDT Add a Comment

Tomcat's Ant Tasks - why they don't work for me

I've written up a howto for implementing [Tomcat's Ant Tasks|TomcatAntTasks] and why they don't work for me. I've been requested by a few users to use them vs. my current <copy> method, but I don't see why I should. Please read the wiki page and help me out if you can.

Posted in Java at Jun 24 2003, 04:12:32 PM MDT Add a Comment