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,857 entries found.

You can also try this same search on Google.

[ANN] AppFuse 1.8.2 Released

This release is mostly a bug fix release with no new features. It also includes upgrades to Acegi Security and the Spring Framework. Thanks to all the sponsors who have contributed products and free hosting to the AppFuse project.

To see how AppFuse works, please see the following demos:

Comments and issues can be sent to the mailing list or posted to the AppFuse Issue Tracker.

P.S. I have the Acegi integration done for Remember Me and SSL Switching in another project, so that support should be in CVS sometime next week. Thanks to Justin Spears for his help on this issue.

Posted in Java at Aug 27 2005, 06:42:06 PM MDT 12 Comments

Using CruiseControl with Subversion

This morning, I had the pleasure of setting up an AppFuse-based project to run under CruiseControl. Normally, this is very easy to do because I have the CruiseControl setup files and instructions. However, this project uses Subversion instead of CVS. Luckily, Subversion is easy to use and I was able to modify things to work quite easily. Below are the steps you can take to modify your AppFuse project to run under CruiseControl and Subversion.

  • Download svant and extract it to your work directory.
  • In build.xml, change your "cvs" target to "svn" and change the tasks appropriately.

        <path id="svn.classpath">
            <fileset dir="svnant-1.0.0-rc1/lib" includes="*.jar"/>
        </path>
            
        <taskdef resource="svntask.properties" classpathref="svn.classpath"/>
        
        <target name="svn">
            <delete dir="checkout/appfuse"/>
            <svn>
                <checkout url="https://svn.java.net/svn/appfuse/trunk" 
                    revision="HEAD" destPath="checkout/appfuse" />
            </svn>
        </target>
    
  • Modify the "test" target in build.xml to depend on "svn".
  • In config.xml, change the <modificationset> to be <svn LocalWorkingCopy="/home/cc/work/checkout/appfuse"/> instead of the <cvs> equivalent.

The instructions have been documented on the wiki and checked into AppFuse's CVS.

Posted in Java at Aug 24 2005, 10:24:26 AM MDT 4 Comments

What do you want to see at Java in Action?

I'm presenting two sessions at Java in Action in October. The first one is a 3-hour tutorial on Comparing Java Web Frameworks, while the second is about Developing Next Generation Web Applications with Ajax in Spring. I'm in the process of writing both of these, and I'm interested to see what Java developers would like to see in these talks.

The tutorial is probably the toughest one because my normal presentation usually only takes about an hour to deliver. For a similar presentation, see Craig McClanahan's The Evolution of Web Application Architectures. I could talk about the history like Craig does, or I could talk about the different frameworks and their features like I usually do. However, I want something more interactive and fun for attendees. I was thinking of live-coding for 20 minutes with each framework, and showing the differences, but that's not a whole lot of fun either. Maybe I could divide the class into 5 groups, educate each of them on features of the framework, and then we could have some sort of debate? Showing code is always something that developers are interested in, so I'll have to figure out how to work that in as well. If you're planning on attending this tutorial - I'd love to hear suggestions.

I'm also curious on what you'd like to see in the 2nd presentation? I was planning on using Equinox (or possibly AppFuse), to show how to use DWR, Prototype and script.aculo.us. A couple of examples I'm thinking of showing are in-page updates and sortable/pageable tables. Any other cool effects or tricks you'd like to see?

Sorry for the cross-post from JRoller, but I wanted to reach the largest possible audience. Please leave comments on the JRoller entry.

Posted in Java at Aug 22 2005, 10:23:34 PM MDT

Prettying up JSPWiki's URLs

Recently, AppFuse user Charlse Li sent me an e-mail with a "PostfixURLConstructor" class designed to pretty up JSPWiki's URL. With the patch he sent, I was able to change URLs from /wiki/Wiki.jsp?page=AppFuse to /wiki/AppFuse.html. Applying the patch was quite easy, but maintaining backwards compatibility and security required a little more work. Below are the steps I went through to get everything working properly:

  • Download postfixurlconstructor.zip and extract to your hard-drive. Copy the "com" directory to your wiki/WEB-INF/classes directory.
  • Change the <url-pattern> of the WikiServlet in web.xml from /wiki/* to *.html.
  • Add the following two lines to your WEB-INF/jspwiki.properties file:

    jspwiki.urlConstructor = PostfixURLConstructor
    jspwiki.PostfixURLConstructor.postfix = .html

This is all you need to do to change the default URL schema. However, if you're like me and you've had a JSPWiki instance setup for awhile, you'll need to maintain backwards-compatibility. I wanted to make sure the old URLs mapped to the new ones. In addition, the "edit URL" changed from Edit.jsp?page=PageName to pageName.html?do=Edit. Since web.xml and <security-constraint> can't contain regular expressions, I used the ultra-cool UrlRewriteFilter to solve both issues. Here's the steps I went through to configure it properly:

  • Download UrlRewriteFilter 2.5.1 and extract the JAR to your WEB-INF/lib directory.
  • Change your web.xml to use a 2.3 DTD instead of a 2.2 DTD and add the filter and filter-mapping to web.xml.
  • Create a WEB-INF/urlrewrite.xml file with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<!DOCENGINE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.5//EN"
    "http://tuckey.org/res/dtds/urlrewrite2.5.dtd">

<urlrewrite>
    <rule>
        <from>^/Wiki.jsp\?page=(.*)$</from>
        <to type="redirect">$1.html</to>
    </rule>

    <rule>
        <from>^/(.*).html\?do=Edit$</from>
        <to type="redirect">Edit.jsp?page=$1</to>
    </rule>
</urlrewrite>

That's it - restart your server and you should be good to go. Thanks for the patch and instructions Charlse!

Update: There does seem to be a couple of issues. The 1st is that none of the attachments are resolving correctly (example). The 2nd that when I try to edit a page, it always shows up with the Main page's text. I'm not going to back out the change just yet, but I will if I can't fix it in the next several hours.

Update 2: I ended up backing out this change, but left in a forward from *.html to Wiki.jsp?page=$1 so all URLs in this post should still work. The "not being able to edit" was the major reason I rolled back to the old URL schema. The attachment issue seems to be related to my browser's cache. Clearing it fixed the problem.

Posted in Java at Aug 21 2005, 03:01:59 PM MDT 1 Comment

Wicket is the most widely used Java Web Framework

According to this post, Wicket is the most widely used Java web framework. While I believe his statements are true, IMO it's only true in the context of this guy's post. My guess is that most of the folks that read his post were Wicket users, or somehow the Wicket Team got wind of this and told users to e-mail this guy. The main reason I don't believe that Wicket is the most popular is because it's so new. I do think it's an up and coming framework that may become the most popular, but I don't think it's there yet.

So, to answer this question, I believe that claiming Wicket to be the most widely is Just Good Guerilla PR. To put some numbers behind that, here's some graphs showing mailing list traffic for the various Java web frameworks.

Web Framework Mailing List Traffic - May/July 2005

Granted, these are just indicators of the number of users - but I believe they are a good indicator. One interesting note about these stats is that Wicket's mailing list traffic has increased significantly in the past few months. Ironically, here's what one of the Wicket developers had to say about this statistic about a month ago:

... who says having a lists that has a lot of traffic is a good thing? It might just as well be an indication of a too-hard-to-understand framework having insufficient documention.

In the past couple of months, I've spoke in front of 25+ Java developers on 4 different occasions to talk about web frameworks. I've asked those developers which frameworks they've used, or plan on using. Struts is still the most widely used, with WebWork and Tapestry the least used. Surprisingly, JSF seemed to be getting no traction among the the audiences I spoke to. Even more surprising (to me at least) was that the most popular web framework continues to be the in-house framework. The overwhelming majority of the developers I've talked to aren't even using open-source web frameworks.

Posted in Java at Aug 18 2005, 12:13:11 PM MDT 2 Comments

Integrating Lucene with Hibernate

The code_poet has an interesting post on using a Hibernate interceptor to index objects for Lucene searching. I've been thinking about integrating Lucene into AppFuse (or at least providing a tutorial) for quite some time. Hopefully this post will serve as a starting point when I do. I wonder how much the Lucene code can be simplified by the Spring support in the Spring Modules project?

Posted in Java at Aug 17 2005, 10:19:09 PM MDT 17 Comments

Equinox on Resin 3.0.14

Yesterday I moved demo.raibledesigns.com from Kattare to Contegix. The main reason I moved is because Contegix is much more responsive when I have issues, as well as Kattare's server was incredibly slow to startup Tomcat. The move went pretty smoothly, but I did run into a couple issues - caused by moving from Tomcat 5.0.28 to Resin 3.0.14. The issues were only in one application - the MyFaces version of Equinox.

The first issue was that the corejsf-validator.jar that I'm using (for client-side validation) contained an invalid TLD file. It was easy enough to fix as it was missing a <short-name> element. This is the 2nd issue I've found with this library - obtained from David Geary's Core JSF book. The first issue is that Spring's Ant-style patch matching doesn't work when this JAR is in the classpath. Anyone out there using a better (less buggy) library for client-side validation in JSF?

The 2nd issue was that MyFaces depends on commons-el.jar, which is shipped with Tomcat. Not so with Resin. Adding this JAR to my WEB-INF/lib directory solved the problem. I've committed both changes to CVS.

Below is a full listing of the sample apps I have installed on this server. The one app that I didn't move is Struts Resume. I'll be moving that one to appfuse.org today.

I'm open to adding more, so let me know if you have one you'd like hosted. Of course, I reserve the right to refuse suggestions based on my interest in the functionality they're demonstrating. ;-)

Posted in Java at Aug 16 2005, 08:50:27 AM MDT 4 Comments

First Magazine Article: Challenges in the J2EE Web Tier

It's official - I've written (and published) my first article in a magazine. If you received the July issue of Java Developer's Journal, you'll see my article titled Challenges in the J2EE Web Tier.

Over the course of its life, the J2EE Web Tier has faced many challenges in easing Web application development. While it's a scalable, enterprise-ready platform, it isn't exactly developer-friendly. Particular challenges to Web developers include the need for a standard Web framework, compatible expression languages, and availability of components. Several Web frameworks have been developed to resolve these issues, each with its own strengths and weaknesses. This article discusses the unique challenges of the J2EE Web Tier and how various technologies have attempted resolve them. By learning from and competing with each other, these Web technologies play an important role in pushing the limits of excellence to produce ever-higher standards of Web application development.

Enjoy!

Posted in Java at Aug 10 2005, 04:30:22 PM MDT 11 Comments

Failed upgrade to Struts 1.2.7

Yesterday I made an attempt to upgrade AppFuse to use Struts 1.2.7 instead of 1.2.4. Everything seemed to go smoothly until I started running my Canoo WebTests with JavaScript enabled. It turns out there's a major bug (IMO) in Struts 1.2.7 where the JavaScript rendered by Commons Validator can't handle the Struts' <form> tag in XHTML mode. I tried a nightly build (20050809), but it's not fixed there either, so I backed out the upgrade.

The interesting thing about Struts 1.2.7 is SpikeSource has certified this release. Are they not testing JavaScript as part of their certification test?

Another thing I attempted to upgrade yesterday was Canoo WebTest from build574 to build976. No dice - mainly because of issues with Prototype (I think). The worst part is everything works fine in a browser. Even worse is I still have a problem with build574, but it doesn't cause the tests to fail. Times like this make me wish Selenium was more polished and ready to use. I talked with some ThoughtWorkers last week and they said the Java driver is ready for a 1.0 release, but one of the committers wanted to make sure all language drivers were ready first (at least that's what I remember).

Posted in Java at Aug 10 2005, 11:17:35 AM MDT 9 Comments

Shifting Priorities

Daddy's Bus in Zion This week's Denver JUG meeting looks to another good one - this time Bruce Tate is presenting Beyond Java and Sharad Acharya will talk about dynamic Struts Forms. I'm sure I could learn a thing or two from attending this meeting, but I'm going to have to pass.

It's time for me to shift my priorities. The 2nd week of every month, there are two meetings I'd like to attend - but I've only ever attend one (DJUG). I don't attend both b/c they're back-to-back and that's not very nice for me to leave Julie to fend for herself with the little munchkins. Starting tomorrow, I'm going to quit going to DJUG and start going to the Colorado VW Bus Club meetings instead.

It's time to start restoring the bus. I started it up this weekend and it roared to life after sitting for several months. I took it for a spin around the block and I can feel that it's ready. I am too. ;-)

Posted in General at Aug 08 2005, 09:57:52 PM MDT 1 Comment