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 "matt". 663 entries found.

You can also try this same search on Google.

JSP's Evolution

There's another interesting discussion taking place over on the struts-dev list again. Man, I'm glad I subscribed (again) to this list last week! It started out as a discussion of JSP vs. Velocity and Craig (McClanahan) provided an interesting evolution of JSP (and comparison to Velocity).

Velocity:
========

(Note -- it's assumed that the Customer collection has been stored in the
VelocityContext by some preceding business logic.)

  \#foreach $result in $results {
    <tr>
      <td>$result.ID</td>
      <td>$result.Name</td>
    </tr>
  }

JSP 1.1 (with Scriptlets):
=========================

  <%
    Customer custs = ...;
    for (int i=0; i < custs.length; i++) {
  %>
    <tr>
      <td><%= custs[i].getId() %></td>
      <td><%= custs[i].getName() %></td>
    </tr>
  <%
    }
  %>

JSP 1.1 (with custom tags):
==========================
(Note -- it is assumed here and in the following examples that the Customer collection has been stored by some preceding business logic.)

  <logic:iterate id="cust" name="custs">
    <tr>
      <td><jsp:getProperty name="cust" property="id"/></td>
      <td><jsp:getProperty name="cust" property="name"/></td>
    </tr>
  </logic:iterate>

JSP 1.2 + JSTL 1.0:
==================

  <c:forEach var="cust" items="${custs}">
    <tr>
      <td><c:out value="${cust.id}"/></td>
      <td><c:out value="${cust.name}"/></td>
    </tr>
  </c:forEach>

JSP 2.0 + JSTL 1.0:
==================

  <c:forEach var="cust" items="${custs}">
    <tr>
      <td>${cust.id}</td>
      <td>${cust.name}</td>
    </tr>
  </c:forEach>
</pre>

I can't wait for JSP 2.0 - it's going to make everything so much easier. Once again, we have exciting times for the Java world. With the power of JSP 2.0 and XDoclet, deadlines should be a non-issue. Now we just have to figure out the best way to use them, and the fastest way to pump out a Struts project. Wouldn't it be awesome if you you could add a new column to a table, build your project using Ant and XDoclet and whalla, all your classes are updated! That would be cool - and I think it's possible. Now I just have to figure out how - and fast!

Posted in Java at Nov 22 2002, 06:05:23 PM MST 6 Comments

Denver JUG Meeting and Struts

The Struts Framework I managed to attend the DJUG meeting tonight (as I wrote this, time slid past midnight - oh well, it looks better on a new day). I arrived early for the Basic Concepts meeting and stayed for the Main Event. Both sessions were focused on Struts - the first being a very basic overview of MVC and Struts, and the second highlighted the newest features (i.e. Declarative Exception Handling, Validator, DynaActionForms). Like I said earlier, I wanted to meet Sue in person, so that's why I got there early. I introduced myself and she actually seemed to remember me (from the e-mails). I confirmed that she really did remember me (or she faked it quite well) at the end when she signed a copy of her book (that I won) - she asked me if I spelled my name with one "t" or two? Cool! BTW - do you know anybody named "Mat?"

When the DJUG Prez asked if anyone was looking for work, I raised my hand and said a few words about this site and Roller. I doubt anyone will find this site though; I didn't see anyone writing my domain name down, and how the heck do you spell "Raible?" So to offer a little Google love, here are a few different versions: Rabel, Riable, Raibel, Raybel, Rable, Raybell. If I was really bold, I guess I could send an e-mail to the DJUG Mailing List. I think I'll have to pass though, I'm just not that forward of a guy.

The meeting was packed, probably a 100 people showed up - most they've had in long time from the way they were talkin'. It was at DU, my Alma Mater, so it was fun to visit the ol' stompin' grounds. I had Mini-Me with me and found the DU Wireless network, but it required VPN software to get in (and my old id/pass didn't work to d/l the software).

Sue was a good speaker and did manage to impress me with her Struts knowledge. I didn't know that she is a contributing author of the JSP and Servlets column at O'Reilly's OnJava.com, nor that she's got a list of seemingly great publications. I tried to give her a tip about XDoclet, but she said she already knew about it and was planning on mentioning it in her preso. Doh! She really put me in my place. The best part of her presentation (for me) was the declarative exception handling, which I tried to implement on my current project, but it was too immature and buggy at the time. I think it's time to re-examine and refactor.

As a service to my readers, and possibly to readers from the meeting, here is a whole posse of good Struts links:

I'd love to see some weblogs published by Sue or Chuck (Cavaness) - it'd be great to see more Struts Evangelists in the blogging community. The next meeting should be good. Marc Fleury, founder of JBoss fame is going to be speaking.

Posted in Java at Nov 13 2002, 06:58:45 PM MST 3 Comments

Explanation of Tomcat's Class Loader

from the Chief Developer of Tomcat and Struts:

> On Fri, 9 Aug 2002, Matt Raible wrote:
>
> Struts Dev Team - please verify my hypothesis below.
>
> I believe the Struts JARs and the DBCP JARs from common should be the 
> same.  After all, Struts does use the DBCP in it's distribution.  You 
> might want to upgrade to the latest build of Struts (which includes 
> DBCP and Logging, among others).  I know they're planning on releasing 
> 1.1 Beta 2 this weekend.
>

The story is somewhat convoluted (I *hate* class loaders :-), but it goes 
like this:

If you are going to use a JNDI datasource, then both your webapp AND 
Tomcat need to see the same copy of the JDBC driver and the dbcp classes
 (for 4.1.x) -- and the way to make that happen is to put the driver into 
common/lib.

Because commons-dbcp.jar is there, it's dependent jars (such as 
commons-collections.jar, jdbc2_0-stdext.jar, and (recently added) 
commons-lang.jar) need to be in common/lib as well.  Plus, of course, 
jndi.jar if you're on a 1.2 system.

Having any of these JARs duplicated inside the webapp causes a problem
 in 4.x based systems, because they try to use the local copy first -- and a
 copy if foo.bar.MyClass loaded from the webapp is *not* the same class 
as a copy of foo.bar.MyClass loaded from common/lib.  This is a place where 
Tomcat's modified class loader model causes grief (but only because you're 
trying to use the same classes that Tomcat internally is trying to use -- if you 
were using something like GenericDataSource with your own copy of the 
connection pool, it would not be a problem).

One workaround for this would be to try turning off the modified loader 
delegation model, by putting something like this in your server.xml file (or in
 a context configuration file on Tomcat 4.1.x.):

  <Context path="/myapp" ...>
    <Loader delegate="false"/>
  </Context>

This *should* let you have a copy of all the JAR files inside your webapp, 
as well as in common/lib, but not cause any conflicts.

Please let me know, one way or the other, if this works -- it's clearly a 
desireable goal that you can ship a WAR file with all the included commons 
JARs but not have problems like this.  I want to review how Tomcat's default 
configuration can make this easier.  And, from a Struts application perspective 
(not just for Roller), this is a pretty serious usability issue.

> HTH,
>
> Matt
>

Craig McClanahan

PS:  In Tomcat 4.1.x, the "deploy" command of the manager app lets you include 
a context configuration file in the WAR, at location "META-INF/context.xml".  So it 
might still be possible to configure a single WAR that works correctly in Tomcat 
4.1.x and still works in other servers (that would obviously ignore such a file).

Thanks for the clear and concise definition of how this all works Craig. So basically, in Tomcat 4.x, don't keep duplicates of your JARs in $CATALINA_HOME/common/lib AND in yourApp/WEB-INF/lib, OR turn off the modified loader delegation as specified above. Tomcat 4.1.x looks very cool, I'm just curious to know why they're on a Beta Release of 4.1.8, but still no official release?

Posted in Java at Aug 10 2002, 12:49:00 AM MDT Add a Comment