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.

Sun to Present Chip-Design Breakthrough

This seems huge to me - whaddya think?

Network computer maker Sun Microsystems Inc. researchers will report on Tuesday that they have devised a way to dramatically increase the speed at which semiconductors can talk to each other.

By placing the chips edge to edge, directly touching, so data can flow freely, Sun has taken out the need for the tiny wires, pads and solder points that now connect chips on printed circuit boards that help make up computer systems, Sun said. [Yahoo News]

Posted in Java at Sep 23 2003, 09:56:19 AM MDT Add a Comment

[ANNOUNCE] Display Tag 1.0 beta 1 Released!

The Display Tag Library has a new release! Fabrizio Giustina has been a busy guy as well as John York in refactoring the entire tag library. We had a run off between the two refactorings and Fabrizio won. This release is pretty stellar - checkout the full list of changes.

Temporary: I've uploaded a demo war that will self destruct as soon as displaytag.org is updated. This message will also disappear at that time.

Posted in Java at Sep 23 2003, 07:35:44 AM MDT 2 Comments

CVS Spam has a new release

CVSspam, a very cool tool, has a new release out. Release Notes and Download.

Posted in Java at Sep 23 2003, 05:40:22 AM MDT Add a Comment

In August of Last Year

I began to learn a whole lot about Ant from Erik Hatcher. Good guy, great words - fun stuff.

Posted in Java at Sep 20 2003, 12:34:25 AM MDT Add a Comment

Vanity URLs in Struts

I figured out a way to make your Struts' app have URLs like the following:

http://raibledesigns.com/weblog?method=edit
http://raibledesigns.com/weblog.jsp?method=edit
http://raibledesigns.com/weblog.html?method=edit
http://raibledesigns.com/weblog.php?method=edit
http://raibledesigns.com/weblog.asp?method=edit

Might be a nifty little trick to try. Pump out a version of Roller with this feature enabled and you could say you made a .NET version! ;-)

Here's how:

1.  I created a RequestFilter that maps to /*
2.  This filter checks to see if request.getServletPath() matches any of the
action paths in struts-config.xml.  If so, it forwards to the action.
3.  As an added feature, I added a set of allowed extensions to this
filter's init parameters.  So far I have .jsp,.html,.asp,.cfm (using .jsp
ensures no one links to them directly, MVC enforced!) - so marketing can
choose what technology they want to convey ;-)

This seems to work great.  For example, I have an "advancedSearch" action
defined as follows:

    <action path="/advancedSearch"
      type="org.apache.struts.actions.ForwardAction" 
      parameter=".advancedSearch"/>

(ForwardAction will eventually be replaced, if necessary, with a real
action).  This allows all of the following URLs to work:

http://site.com/do/advancedSearch (works with Struts by default)
http://site.com/advancedSearch
http://site.com/advancedSearch.html + all other extensions listed.

More information (including source code) can be found on the struts-user mailing list.

Posted in Java at Sep 19 2003, 06:23:24 PM MDT 2 Comments

AppFuse Refactorings

I did some refactorings of AppFuse yesterday - inspired by an e-mail I received from Jon. I basically de-coupled my Actions from Hibernate - tossing around a connection object in the constructors of my Managers and DAOs (rather than the method signatures). A little more casting, but no noticeable performance difference. I'll upload the source shortly.

Update: - Source has been released.

Posted in Java at Sep 19 2003, 06:06:53 PM MDT

JSF: Allows WebWork style Actions

Am I working too late or does JSF allow a WebWork style Action? According to this post, you can have your properties and your logic in the same class (like WebWork). Also, no more worrying about BeanUtils.copyProperties()?

Struts encourages you to use Strings for field values that might need conversion, in order to redisplay correctly in case of conversion errors. You don't need to worry about that with JavaServer Faces, because the redisplay is handled by the components themselves. You will generally use the native data types for your field properties.

Regardless of what the WW Developers say, I think I'm gonna dig Java Server Faces.

Posted in Java at Sep 17 2003, 07:03:34 PM MDT 5 Comments

SSL switching with web.xml

Craig McClanahan explains how to force SSL using settings in your web.xml. Pretty cool stuff, I guess I didn't realize that you could have a <security-constraint> without having an <auth-constraint>. This sure seems a lot more straight forward than using SSLExt or a custom tag library.

Posted in Java at Sep 15 2003, 11:58:55 AM MDT 2 Comments

Persistence Options with existing SQL

At my new gig, it's not an option to use Hibernate. Their data model is too complex, and they've already written a bunch of code and it's corresponding SQL to get the information they need (think lots of inner joins, stored procedures and selects in where clauses). It was my task last week to port all the JDBC from one project to a more general framework to be used by all the websites we're building. The existing code is in the following form:

PreparedStatement pstmt = 
    conn.prepareStatement("select * from table where id=?");
pstmt.setInt(1, id);
ResultSet rs = pstmt.executeQuery();
MyBean bean = new MyBean();
if (rs.next) {
    bean.set(...);
    ...
    bean.set(...);
}

After doing all my persistence with Hibernate for the last year, it made me cringe to have to resort to this archaic (though tried and true) way of populating my objects. So I pinged the struts-user mailing list and asked what my options where for populating an object from a ResultSet. Basically, I was looking for a 1-2 line solution that didn't affect performance too much. After jossling back and forth for a while, I came up with 2 options:

I did some performance testing and the ResultSetUtils class had the same performance numbers as rs.next() { set, set, set }, so it was definitely a viable solution. The downside? You have to name your resultset columns the same as your object's properties - and it's case sensitive. iBATIS was also a slick solution - as soon as I added <settings useBeansMetaClasses="false"/> to my sql-map-config.xml file, the performance was comparable to the ResultSet options (I turn it on when deploying, off for unit tests).

My Point: We're using iBATIS for our Persistence framework, and I dig it. It allows us to keep the complex SQL (externalized in XML files) that has already been written and it took me about a 1/2 hour to setup. I'd recommend Hibernate if you're starting a DB from scratch, but iBATIS seems to be a great solution when the SQL is already in place.

Will I add an iBATIS option to any of projects? Naahhh, then I'd have to work with Hibernate to export the SQL for each call, and I'd have to update my XML file's SQL everytime I change something in the DDL (currenly Hibernate and XDoclet perform this magic).

Posted in Java at Sep 15 2003, 07:17:30 AM MDT 1 Comment

[ANNOUNCE] Struts Resume 0.8 Released!

The highlights of this release include rendering a resume with Velocity (demo), a password hint feature, self-registration feature, and a gzip compression filter. See the release notes below for a full list of changes. If you're looking to create a new application based on this architecture, you're best off using AppFuse.

Thanks to Russell Beattie for the Resume's XHTML template and to Mathias Bogaert for the Velocity RTF Templating idea.

Posted in Java at Sep 14 2003, 09:18:52 PM MDT