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 "la blue girl episodesorgasm denial web tease". 1,368 entries found.

You can also try this same search on Google.

Zero Configuration in Struts 2

Struts 2 has a nifty zero configuration feature. However, it's only useful for registering actions, not for automatically registering results. In other words, you still have to use an @Result annotation to tell your action what page to dispatch to. To use default view names instead of requiring @Result, you can use the Codebehind Plugin. Also, did you know Struts 2 will autowire your Spring dependencies? It's pretty slick.

What does this all mean? It means you can write your Struts 2 application without writing any XML. Of course, you can still use XML to tweak behavior, but with these plugins enabled, you won't have to.

IMO, these plugins should be combined into a single zero configuration feature.

Here's how you can enable Struts 2's Zero Configuration feature in AppFuse 2.0:

  1. Add a packageNames parameter to the "struts" filter in your web.xml:
    <filter>
        <filter-name>struts</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
        <init-param>
            <param-name>actionPackages</param-name>
            <param-value>com.company.newapp.webapp.action</param-value>
        </init-param>
    </filter>
    
  2. Add the Codebehind Plugin as a dependency in your pom.xml:
    <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-codebehind-plugin</artifactId>
        <version>2.0.6</version>
    </dependency>
    
  3. Add a struts.codebehind.pathPrefix constant in struts.xml for your default pages directory:
    <constant name="struts.codebehind.pathPrefix" value="/WEB-INF/pages/"/>
    

That's it - now you can code away without configuring anything!

How does this compare to other web frameworks in AppFuse? Tapestry has a similar feature, but Spring MVC and JSF don't. Spring MVC still requires you create a bean definition for Controllers and JSF requires you write a chunk of XML for each managed bean. Of course, if you know how to do something similar with Spring MVC or JSF, please let me know.

Posted in Java at Mar 07 2007, 05:19:18 PM MST 9 Comments

Artifactory - a new Maven 2 Repository Manager for Enterprises

From the Maven 2 user list:

We would like to announce the immediate availability of Artifactory, a Maven 2 enterprise proxy.

Artifactory offers advanced proxying, caching and security facilities to answer the needs of a robust, reproducible and independent build environment using Maven 2. It uses a JSR-170 Java Content Repository (JCR) for storage, which makes it extremely easy to manage searchable metadata, and provide extended features such as security, transacted operations, auditing, locking, etc.

Artifactory is distributed under APLv2 at http://artifactory.sourceforge.net. It is currently available as a downloadable archive, that can be run out of the box (with default settings). An install script to run it as a Linux service is also provided. A (limited) guest live demo is available at http://www.jfrog.org/artifactory (username/password is guest/guest).

You are welcome to give it a go!

Cheers,

Yoav Landman,
The Artifactory Team

So how does this compare to Archiva, Proximity and Maven Proxy? One user writes (formatted for better reading):

My experience so far:
  • Archiva: Alpha; doesn't work (random webdav deployment failures), loads of bugs, low rate of progress. Feels dead.
  • Proximity: Works; slightly confusing (don't like the separation of metadata); lots of new releases constantly; hard to configure (hacking around with spring config files) - our install takes *forever* to restart.
  • m2proxy: simple, but simple.
Fingers crossed that artifactory hits the sweet spot...

It's interesting to see that Artifactory's UI is powered by Wicket and Dojo. The demo seems kind of sluggish, but I don't believe this application is meant to handle more than 10 users at a time. For more information on Artifactory's features, see its introduction page.

It's great to see a (seemingly) good tool come out for internal repository management.

I spent a couple days last week analyzing the best open source continuous integration server for Maven 2 projects. Hudson turned out to be the clear winner with the best UI and easiest setup. It also actually worked, which is a lot more than I can say for Continuum. While I did get Continuum to work, it required turning on anonymous SVN (no, putting the username/password in the URL did not work). CruiseControl worked as well, but required config.xml knowledge, which sometimes scares admins. Pulse and Bamboo continue to be the best commercial Maven 2 testers, while TeamCity failed my 10-minute test (twice!). One of the features I was looking for was Trac integration and that only exists for CruiseControl and Continuum.

It's amazing to see projects like Continuum and Archiva. If they're any reflection of the Maven team's ability to develop software, that's frightening. My advice: discontinue both of these projects as they're a waste of anyone's time to even research them.

Update October 2009: Fast forward a couple years and I take back what I said about the Maven's team ability to develop good software. Nexus is a kick-ass Repository Manager.

Posted in Java at Mar 05 2007, 07:35:00 AM MST 24 Comments

Upgrading to Tomcat 6

Erik did it, so I tried it as well. This site is now running Tomcat 6.0.10 and it has to be the least painful major Tomcat upgrade I've ever done. By major, I mean upgrading from one version number (5.5.17) to the next. Apparently, no XML files changed (like they did from 4.1.x -> 5.0.x -> 5.5.x) because I was able to copy over conf/server.xml and conf/Catalina/** without any issues. The only change I had to make was to copy commons-logging.jar from Roller's WEB-INF/lib to JSPWiki's.

I have seen a couple of the following errors in my log files since I upgraded, so if you see any strange behavior, please let me know.

2-Mar-2007 12:36:10 AM org.apache.tomcat.util.http.Parameters processParameters
WARNING: Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: EOF
        at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:83)
        at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
        at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
        at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392)
        at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:508)
        at org.apache.tomcat.util.http.Parameters.handleQueryParameters(Parameters.java:266)
        at org.apache.catalina.connector.Request.parseParameters(Request.java:2404)
        at org.apache.catalina.connector.Request.getParameterValues(Request.java:1089)
        at org.apache.catalina.connector.RequestFacade.getParameterValues(RequestFacade.java:396)
        at javax.servlet.ServletRequestWrapper.getParameterValues(ServletRequestWrapper.java:189)
        at org.acegisecurity.wrapper.SavedRequestAwareWrapper.getParameter(SavedRequestAwareWrapper.java:325)
        at org.apache.roller.ui.rendering.velocity.deprecated.OldPageRequest.(OldPageRequest.java:164)
        at org.apache.roller.ui.rendering.velocity.deprecated.RedirectServlet.figurePageRedirect(RedirectServlet.java:285)
        at org.apache.roller.ui.rendering.velocity.deprecated.RedirectServlet.doGet(RedirectServlet.java:131)

I tested AppFuse 2.0 on Tomcat 6.0.10 earlier today and impressed that 1) Cargo worked perfectly and 2) most of the web frameworks worked. Which one didn't? You guessed it - good ol' JSF. That's OK though, the JSF version of AppFuse (MyFaces 1.1.5 with Facelets 1.1.11) doesn't work with Jetty 6.1.1 either. The good news is I found a workaround - removing the el-api dependency from my pom.xml makes it work on both.

    <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>1.2</version>
    </dependency>

If I remove this dependency, everything works fine on Tomcat 6.0.10 and Jetty 6.1.1. Unfortunately, it seems this dependency is needed for Tomcat 5.x. Hopefully some fancy stuff with Maven profiles can fix this incompatibility.

Posted in Java at Mar 02 2007, 12:44:46 AM MST 10 Comments

Airport Extreme

Airport Extreme Even though I managed to get my home network speedy again after my bandwidth speed issues, I bought a new Airport Extreme last week. My main reason for buying it was its USB device sharing feature. I have a Suse 10 box that runs Samba, DHCP, DNS right now, but for some reason, my MacBook Pro doesn't work for printing to CUPS over Samba. In my experience, printing is one of the major issues with Macs - it just never seems to work when you want to print over a network. I have gotten it to work in the past, but it's often been a wretched weekend's adventures where I end up sacrificing a goat to the CUPS gods to get everything working.

So by buying an Airport Extreme, I figured I'd have an Apple product at the center of my network and all my problems would be solved. I was wrong.

First of all, why can't there be a web interface on this sucker? Why does it require that I have a client installed to configure it? With most routers I've worked with in the past (NetGear and Linksys), the web interface might've been clunky, but it didn't require I install a CD. I initially tried installing the software on Windows XP, but for some reason it wasn't able to communicate. So I installed it on my Mac and was able to configure everything. While the setup process worked, and I was able to access the internet afterwards, this device doesn't seem to work well with my network. After plugging my printer in (an HP OfficeJet G85), I was able to add it on both XP and OS X using Bonjour. However, no matter what I sent to the printer, it'd never print. Further gripes: it might have an integrated firewall, but there doesn't seem to be a way to configure it. I couldn't find any way to do port forwarding. This stuff is so simple to do on my Netgear router.

At this point, it seems logical to return my Airport Extreme as it simply doesn't work as expected. Of course, my frustration could be from my lack of knowledge, but that's the point - I shouldn't have to read the documentation or contact Apple Support - it should all just work.

Posted in Mac OS X at Feb 28 2007, 09:23:29 AM MST 35 Comments

The Good Seats

There's nothing like getting the good seats when you attend a sporting event or concert. This weekend, we had 4th row seats to the Nuggets game on Friday night, 2nd row to the DU Hockey game on Saturday night and first row to The Doodlebops show on Sunday. Believe it or not, The Doodlebops was probably the most fun. The fact that smiles were plastered on Abbie and Jack's faces made it great, but also Abbie got to give Mo a high five and both kids were dancing like they actually knew how. Fun stuff.

Next weekend looks to be great as well. It's dumping in the hills - Steamboat got around 4 feet of powder last week. The forecast is snow all week, with Spring-skiing temperatures this weekend. We're heading up at the end of week, so I'm crossing my fingers hoping for mounds of champagne powder. In the meantime, it's time to start coding like a madman on my new project where I'm building an e-commerce site with AppFuse 2.0.

Posted in General at Feb 26 2007, 05:15:36 AM MST 6 Comments

Comparing Java Web Frameworks at ApacheCon Europe

It's been almost 2 1/2 years since I created and presented my "Comparing Web Frameworks" talk at ApacheCon 2004. It's hard to believe that was my first talk in front of a large audience. Before that conference, I posted a list of possible topics, as well as an outline a few days later. The most recent time I presented this talk was at Spring Forward 2006.

At this year's ApacheCon Europe, I'll be presenting Comparing Java Web Frameworks again. This time, I'll be adding Wicket and Stripes to the mix. I'm adding these two because they seem to be getting the most hype in Java developer's blogs. Of course, it would be great to add Grails, RIFE and Seam, but that's just too much to cover in an hour. Also, Grails is just Spring MVC and Seam uses JSF - so RIFE is the only one that stands out as unique. Here's the current session description:

One of the most difficult things to do (in Java web development) today is pick which web framework to use when development an application. The Apache Software foundation hosts most of the popular Java web frameworks: Struts, MyFaces, Tapestry and Wicket. This session will compare these different web frameworks, as well as Spring MVC and Stripes. It will briefly explain how each works and the strengths and weaknesses of each. Tips, tricks and gotcha's will be plentiful. Lastly, it will provide attendees with a sample application that utilizes all 6 frameworks, so they can compare line-by-line how the frameworks are different. This sample application will include the following features: sortable/pageable list, client and server-side validation, success and error messages as well as some Ajax functionality. The frameworks will be rated on how easy they make it to implement these features.

Over the next couple months, I'll try to post a revised outline so all the folks who care about a comparison like this can voice their opinions. I'll also be integrating Stripes and Wicket into AppFuse and AppFuse Light.

I'm still not sure about the name "AppFuse Light", but it's probably better than "AppFuse LE" which doesn't seem to convey the concept enough. The problem with "Light" is how to spell it (Bud Light vs. Miller Lite). The nice thing about AppFuse LE is we can shorten it to ALE. Regardless, you gotta love how it can all be related back to beer. ;-)

I've never been to Amsterdam before, so I'm definitely looking forward to this trip. My dad will be joining me, so I'll probably do more site-seeing that conference-going. If you're from the area, do you have any suggestions on what to do and where to stay? My dad has been pricing tickets and thinks we'd be better off flying into Frankfurt, spending a few days in Germany, and then arriving a day or two before my talk (on Friday). However, Queen's Day is the Monday of the conference and I've heard rumors it shouldn't be missed. I've got some Dutch and German in my blood, so it should be fun to visit my ancestral homeland.

Posted in Java at Feb 22 2007, 04:44:43 PM MST 12 Comments

Java is more complicated than .NET ... unless you use AppFuse

From Java to .NET, Back To Java Again, My Little Impression of The Two:

Having said all these, integration of various java projects together really do take a lot of Java people's time, it's no joke, but it's not desperate. For example, the open source project "AppFuse" does a fantastic job integrating various frameworks for us, I strongly encourage everyone to give it a shot and see how much time it saves you.

So which platform do I like? My impression is Java offers a lot flexibility and choices, but at the same time introduced the "Paradox of Choices", having so many things and integrate them together is no easy task, it simply overwhelm the human brains. .NET on the other hand is in a controlled environment, less choices, but easy to develop.

In other words: Java development is way more complicated than .NET ... unless you use AppFuse. ;-)

Posted in Java at Feb 20 2007, 09:25:15 PM MST 5 Comments

NBA Fans are using AppFuse

Did you know that the Utah Jazz and LA Lakers Fan sites are powered by AppFuse? I've had a few beers with Eric (the guy who developed these sites) and he's finally given me permission to post links to both of them.

In addition to these sites, AppFuse also powers the Sacramento River Cats Fan Loyalty Portal. Eric notes:

You might want to mention in your blog that for LA and Utah, if you don't want to create an account you can just click on the demo link on the landing page to see what's inside. But you won't get to enter any of the contests and you'll miss some of the cheerleader pix. There's also a whole admin side for report generation and CMS, but of course that's restricted.

I wonder if Eric has any plans to develop a Denver Nuggets fan site? Julie and I have 4th row tickets to Friday night's game against the Jazz. Should be a fun game for sure. Go Nuggets!

Posted in Java at Feb 19 2007, 09:11:01 PM MST Add a Comment

New Phone - BlackBerry Pearl

BlackBerry Pearl Yesterday I picked up a new phone - a BlackBerry Pearl. The main reason I got it is because I couldn't get my e-mail with my old phone. It seemed like I was tethered to my computer all the time when I was waiting for an important e-mail. Now I feel free. Not only does it works great as a Bluetooth Modem, but it also supports browsing the internet and all of Google's Mobile apps (GMail, Google Talk and Google Maps). Even cooler - when you add a bookmark to a page that has an RSS feed, it detects that and allows you to add a "Web Feed" or a Bookmark. When I added this site as a web feed, it prompted me for Atom Entries/Comments or RSS Entries/Comments. It also allows you to auto-synchronize with your bookmarks or feeds. In other words, it has a built in feed aggregator. With a $20 unlimited data plan from T-Mobile, I love this phone!

The BlackBerry Pearl doesn't work with iSync, but PocketMac seems to do the trick. Unfortunately, PocketMac makes you synchronize with a USB cord whereas iSync uses Bluetooth. The Missing Sync for BlackBerry may solve this problem, but with everything else being free, I don't know if it's worth shelling out $40 so I don't have to plug in.

Some of you may ask, "Why didn't you just get a smart phone with EVDO built in?" The reason I didn't do this is I had a Verizon EVDO card. We were up in Steamboat for a week in January and it absolutely sucked. I worked for 3 days while were were up there (8-12 hours per day) and it was way too slow for me. The average speeds where 120KB/sec and I can easily get those with the Bluetooth Modem on the BlackBerry. Also, I don't want a fully-functional mini-computer for a phone, I just want it for basic calling functionality and the ability to check my e-mail.

What about the iPhone? I'm sure this phone will kick ass, but the fact that it won't support J2ME means that Google's apps won't work. Of course, they'll probably create widgets that'll work on the iPhone, so that argument may be invalid in a few months. The biggest reason I don't like the idea of having an iPhone is one thing - Cingular. I had AT&T as my carrier for a couple years and their customer service was beyond awful. Whenever I would call them for help, it'd take anywhere from 15-45 minutes before I talked to anyone. Today, when I called T-Mobile to get my BlackBerry Internet service setup, they told me the wait would be 6 minutes and they'd call me back when it was my turn. I was very impressed. I hope more phone systems start using a "call me back" feature instead of the current "wait on hold for X minutes" debacle.

So I'm very happy with my new phone and anxious to use it in my travels next week. Where am I going? I signed a contract with a company out in Massachusetts to help them architect and implement a Java-based web infrastructure across all their projects. The initial scope is estimated to be 2-3 months. I'll be flying out to Boston periodically, but most of the time I'll be working from home. I had a number of very interesting full-time opportunities, but the gig I'm taking seemed to be the most interesting technically. With any luck, I'll make it to the New England JUG on Thursday night to hear Mark Fisher's talk on Message-Driven POJOs.

Update: I just found NewsGator Go! for J2ME. I use NetNewsWire on my Mac and FeedDemon on Windows, so it's great to see I can subscribe to my existing feeds on my phone. Thanks NewsGator!

Posted in General at Feb 17 2007, 06:07:08 PM MST 3 Comments

Database Profiles in AppFuse 2.0

Last night, I added several database profiles to AppFuse 2.0 and its archetypes. What does this mean? It means AppFuse should work out-of-the-box with several databases, including:

  • H2
  • HSQLDB
  • MySQL
  • PostgreSQL
  • SQL Server

For example, here's how to test a new AppFuse project works with H2:

mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=1.0-m4-SNAPSHOT -DgroupId=com.mycompany -DartifactId=myproject
Yeah, I wish there was a way to shorten this command (or prompt for choices) too.

After doing this, you can cd into the "myproject" directory and run mvn integration-test -Ph2. AppFuse 2.0 projects are configured for MySQL by default, so if you want to permanently activate one of these profiles, you can add the following between the <id> and <properties> section of the profile.

    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>

In addition to the profiles listed above, I tried to get Oracle Express and embedded Derby working. No dice on either one. I took a brief look at DB2 Express as well, but with a 400 MB download and 3 JARs required for its JDBC Driver - it seemed like a lot more trouble than it was worth.

Maven 2's build profiles are a powerful feature that we hope to make easy to use. For example, to test your new project with H2 and JBoss, you can simply run mvn integration-test -Ph2,jboss. Thanks to the power of Cargo, this will download JBoss 4.0.5, install it, and run all the Canoo WebTests within it. Of course, this will take a while the first time - especially since JBoss is a 77MB download. Fortunately, we allow you to change one small setting in your pom.xml and use an existing install instead.

Maven 2 is a kick-ass build/deploy/test tool once you figure it out. With AppFuse 2.0, we're doing all the "figuring out" for you. ;-)

NOTE: I would add more server profiles, but Cargo's Maven Plugin (version 0.2) has issues with Geronimo 1.1, Jetty 6.x and Resin 3.x. Strangely enough, Jetty's Maven Plugin version 6.0.0 works great, but 6.1.0 throws stack traces.

Update: Support for Oracle and Derby (in networked mode) has been added. We'll consider adding support for DB2 if IBM can figure out how to package their JDBC Driver into a single JAR.

Posted in Java at Feb 14 2007, 05:41:37 PM MST 27 Comments