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.

My IDEA Evaluation - Eclipse is better

I've been trying to use IDEA (on OS X) for the past few weeks and I keep reverting back to Eclipse for features that seem to be missing. I know the features must be there, but I just can't find them. Why else would everyone like it so much? Sidenote: I've never used IDEA for a feature that doesn't exist in Eclipse - I'm sure there are some, I'm just not using them. It sure would be cool if someone created a HowTo explaining how to migrate from Eclipse to IDEA. In the meantime, I'll settle for posting my questions here:

  • Debugging in Tomcat - I'm currently using Sysdeo's Tomcat Plugin in Eclipse for Tomcat 4.1.27. It's super easy to setup and use - I expect the same ease-of-use from IDEA. I haven't looked much, but I'd love to hear feedback on IDEA's Tomcat debugging support.
  • Renaming a variable in a JavaBean renames getter and setter methods. Sounds simple enough, in my 10 second search, I couldn't find it. In Eclipse, right-click -> Refactor -> Rename.
  • Override/Implement methods (from parent classes and interfaces). Right click -> Source -> Override/Implement methods in Eclipse.

I'll add more as I think of them throughout the day. So far, I like IDEA, but to be honest - it's not saving me any time over Eclipse. It also locks up as much as Eclipse and it's responsiveness is still a big sluggish on OS X (10.2.8) with 1 GB of RAM (1.33 MHz processor). Hopefully Panther will make both IDEs faster. Two weeks ago, I was thinking of buying it (as well as Dreamweaver) - now I'm frustrated with IDEA's lack of features and Dreamweaver's slowness. I'll probably pass on shelling out the cash since Eclipse and BBEdit are giving me all the features I need in IDEA and Dreamweaver.

Posted in Java at Oct 20 2003, 06:17:51 AM MDT 22 Comments

Web Frameworks - which one should I learn?

I've seen a lot of talk about Web Frameworks these last couple of weeks - particularly JavaServer Faces, WebWork and Spring. There's also been great articles posted comparing Spring and WebWork as well as an Introduction to Spring from TSS. Spring, WebWork and JSF all look like excellent frameworks to me, but I also continue to believe that Struts is a great framework. And I would go so far as to say that it's the best web application framework. Yep, I said it - Struts is the best web application framework to learn if you are a web developer wondering what to learn. Why? Because it will get you a job.

I've continued to receive a fair amount of calls and e-mails over the last couple of weeks - and they're all calling because of my Struts experience. Good luck in finding a company that wants you to build their web application using WebWork or Spring. Maybe someday I'll be lucky enough to hire employees for Raible Designs and build web applications in my own office with my own employees. Then we'll get to choose whatever technology we want to build customers' apps. Until then, I'll stick with Struts and continue to be an employed developer.

I strongly believe the best way to learn anything is to get paid to do it. I've learned Struts over the past couple of years, not because I wanted to, but because someone else wanted me to - and they paid me to do it. Of course, there are some companies that will probably pay you to learn WebWork or Spring, but most would rather not.

Another thing to consider is that WW and Spring will probably someday develop "migrating from Struts" documentation. Sounds like a good idea to me - until then, and until someone pays me to learn the others, Struts is #1 for me.

Now it's your turn to tell me why my logic is flawed... if you can. ;-)

Posted in Java at Oct 17 2003, 01:22:23 PM MDT 21 Comments

JSF Presention and sample code

David Geary's Presentation and sample code from last week's DJUG Meeting can now be found online. From Tom McQueeney, DJUG's new president (congrats Tom!):

For those that missed last week's meeting, David introduced us to the new JavaServer Faces specification, now in its 4th "early access" release on the Sun web site. David considers JSF to be a "Struts killer" once the standard takes hold within the development community and tool vendors. The JSF 1.0 final spec is expected to be released early next year.

Early next year == March from what I've heard...

Posted in Java at Oct 16 2003, 10:36:10 PM MDT Add a Comment

JSTL and Dreamweaver has JSP Tag Completion

I discovered today that there is are new releases of the JSP Standard Tag Library over at Jakarta's Taglibs project. JSTL 1.0 has a Standard 1.0.4 release from September 25th, and there's also an early access 1.1 release (for Servlet 2.4/JSP 2.0). If you're doing JSP development and you're not using JSTL, you'd better start - these tags are huge timesavers and are fairly easy to learn (especially if you know JavaScript).

I also discovered a nice feature in Dreamweaver 2004 - Tag Library code completion. I believe Dreamweaver MX (v6.0) had this as well, but I never use DW on a PC (it's too slow). Now that I'm giving a go at using OS X all the time, I need to use DW so I can get an explorer-like window (BBEdit doesn't seem to have this). It's pretty slick - you just import the .tld or .jar and whalla - you've got tag library code completion. The one downside is that it does not support importing multiple libraries from one JAR file (i.e. Struts or JSTL), so you do have to import the .tld files (selecting all .tld files in a directory works). It might actually be worth the $400 if I keep developing on a Mac. I don't know about IDEA - I started using Eclipse today after using IDEA for the past week and it felt like I was home again.

Lastly, iBatis has a new release. I upgraded from 1.2.7b to 1.2.8 in my current project and all our tests ran without a hitch. Gotta love unit tests.

Posted in Java at Oct 16 2003, 05:19:39 PM MDT 4 Comments

HowTo: Integrate Apache and Resin

From a comment that an anonymous use left: Resin with Apache on Unix. I have used Tomcat for this site for over a year, and the last two projects I've worked on used Tomcat in production. However, James Duncan Davidson indicated that Tomcat was really never meant for production, and it never hurts to broaden one's horizons. I doubt I'll use Resin on this site, but I might recommend it to my next client (if I can get up to speed fast enough).

Why don't I just use Resin's built-in HTTP Server? Because I like Apache's virtual hosting feature and it's #1 for a reason, right?

Posted in Java at Oct 15 2003, 10:17:10 PM MDT 1 Comment

JSP Navigation Systems

As you might already know, I am a committer on the Struts Menu project at SourceForge. Struts Menu is basically just a JSP Tag Library that allows you to configure a navigation system for your webapp from an XML file. Here is a demo. Here are similar menu tag libraries I found:

I also remember seeing one on weblogs.java.net, but their search feature sucks and I can't seem to find it (could be operator error).

Please let me know of any others you know of - or menus you'd like to see incorporated into Struts Menu. The current CVS version (module == navigator) allows for specifying the Menu attributes in XML and the HTML for the menu using Velocity templates (as well as some built-in displayers). Personally, I'm thinking of adding a couple from WebFX: XTree and XMenu. With the new Velocity support, it should be simple to add these. If it's possible with HTML, JavaScript and CSS - it's possible with Struts Menu!

Posted in Java at Oct 15 2003, 05:39:15 AM MDT 4 Comments

Skinning your applications and Apache+Tomcat on RH9

Here are a couple of links I found on mailing lists that might be of use:

  • Xkins: Xkins framework uses Velocity to process snippets of HTML, but you can use any other template processor (Xkins comes with it's own default processor). Xkins also comes with Forms Tag Libs, that allows you to create forms using Xkins and comes with four Skins. Xkins Forms integrates with Struts framework. Xkins also fits perfect in JSF world, playing a role as a RenderKit, and can work with other presentation frameworks, (i.e. struts-layout).I'll stick with simple XHTML and CSS. If I need different layouts (HTML), I'll use a different base tile.
  • John Turner has published a Tomcat 4.1.27 + Apache 2.0.47 HowTo. This is similar to mine, but looks much cleaner and to the point.

Later: I discovered the beauty of John's HowTo this evening. It allows you to specify one measly line in Apache's httpd.conf file and only a few lines in Tomcat's server.xml file and viola Tomcat configures itself! It sets up aliases and such for each webapp that you have deployed. As an example, here's dynamically created section for AppFuse:

#################### localhost:/appfuse ####################                                       
                                                                                                       
# Static files                                                                                     
Alias /appfuse "/opt/dev/tools/jakarta-tomcat-4.1.27/webapps/appfuse"                              
                                                                                                       
<Directory "/opt/dev/tools/jakarta-tomcat-4.1.27/webapps/appfuse">                         
    Options Indexes FollowSymLinks                                                                 
    DirectoryIndex index.jsp                                                                       
</Directory>                                                                                  

# Deny direct access to WEB-INF and META-INF                                                       
#                                                                                                  
<Location "/appfuse/WEB-INF/*">                                                                 
    AllowOverride None                                                                             
    deny from all                                                                                  
</Location>                                                                                 
                                                                                                       
<Location "/appfuse/META-INF/*">                                                              
    AllowOverride None                                                                             
    deny from all                                                                                  
</Location>                                                                                   
                                                                                                       
JkMount /appfuse/j_security_check  ajp13                                                           
JkMount /appfuse/auth/*  ajp13                                                                     
JkMount /appfuse/register/*  ajp13                                                                 
JkMount /appfuse/passwordHint/*  ajp13                                                             
JkMount /appfuse/*.do  ajp13                                                                       
JkMount /appfuse/*.jsp  ajp13                                  

I had all of this working great - I even had Apache upgraded to 2.0.47 on OS X (serving localhost/~user files and everything)! And then I rebooted... Now in catalina.out, I'm getting the following - ugh...

BAD packet 256                                                                                      
In: : [B@c283b5 4/843                                                                               
01 00 03 47 00 00 00 00 00 00 00 00 00 00 00 00  | ...G............                                 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  | ................ 

WTF?!

Solved: I got this solved fairly easily. I had modified /usr/sbin/apachectl so that the HTTPD variable pointed to /usr/local/apache2/bin/httpd rather than /usr/sbin/httpd. I fixed it by removing /usr/bin/apachectl and executing "ln -s /usr/local/apache2/bin/apachectl /usr/sbin/apachectl". Now if I could only get the Rendezvous mod working on 2.0.x.

Posted in Java at Oct 14 2003, 08:09:07 AM MDT 2 Comments

A day of upgrades

I upgraded this site to the latest code from Roller's CVS, and I'm now running Tomcat 5.0.12 Beta. It seems to be working like a charm for FreeRoller so why not? I also upgraded to Eclipse M4 on OS X and WinXP. For those of you looking for a JSP Editor for Eclipse, try Lomboz. I'm using it and it seems to work fairly well. As far as I can tell, all it gives you is syntax highlighting. I tend to use Homesite or BBEdit for JSP pages - they're better HTML editors and always will be IMO. There never will be a "I can do everything" IDE, so why keep searching? Though it would be nice if someone would figure out code-completion for custom tag libraries.

All upgrades seem to have gone smoothly and backups were made in case they crap out.

Update: The Lomboz plugin sucks, at least with the latest Eclipse. Ctrl+C and Ctrl+V don't work ~ maybe that's a good thing...

Posted in Java at Oct 11 2003, 01:31:43 PM MDT 4 Comments

WebWork and JDD

I attended the Boulder Frameworks meeting tonight on WebWork, followed by the Boulder JUG meeting. The WebWork (a.k.a. WW) presentation had a mere 5 attendees, but Kris gave a very good overview of WW and showed how simple it was. Here are some of the strengths of WW according to Kris:

  • It's not dependent on J2EE. Many method signatures are empty and it uses interfaces everywhere, rather than parent classes. Sounds cool. Kris likes it because "it gives you a warm fuzzy feeling you're not tied to WW."
  • It's not Jakarta. "Jakarta is like a Ketchup bottle - you have to beat it to get anything out of it." I don't know that the WW team produces software much faster than Jakarta though...
  • Instead of using the HttpServletRequest, WW uses a Stack, which is essentially the same thing (sans J2EE).
  • WebWork has Interceptors. They're like Filters, but WW comes with built-in Interceptors that can be applied declaratively. Kris mentioned there's little documentation on the built-in Interceptors - a wiki page would be nice.
  • Action packaging - you can turn a portion of your WW application into a jar and it can be added to another WW application. It sounds good, but I can't think of a use for it right now. Sounds like modules in Struts.

Kris's biggest reasons for liking WW was Interceptors and Inversion of Control. However, Struts has those too. Good presentation. I plan to learn WW and give up this whole my framework is better than yours stance. In fact, I hope to do this with many of the technologies I use everyday. I'm going to start using Orion and Resin so I know if Tomcat really is better, or better yet - when should I use one appserver or the other. I'm learning IDEA so I know when to use Eclipse and when to use IDEA. Today I discovered how IDEA warns me about invalid Javadocs (very nice feature). Eclipse continues to rule the CVS integration world, and I see no reason to quit using it and bitch about IDEA's lack of CVS integration.

After WW, I walked across the hall to listen to James Duncan Davidson talk about "James Driven Development" (my phrase) - also known as Objective Object Orientation. Rather than bore you with the details, here are the highlights:

  • Don't abstract too much - just enough to fit your needs. Examples of too much abstraction can be found in Apache's Repositories (James's words - he didn't specify any projects).
  • Don't extend, instead create objects do something, then you don't need to know the interworkings of the object.
  • Dynamically typed languages rock (i.e. Smalltalk, Ruby, Python). They're much easier to develop with, especially when backed my TDD. You can accomplish similar things in Java using lots of casting.
  • He can't wait until something comes along and kills Ant and Tomcat - he never thought they'd make it this far - especially considering he wrote them when he was a Junior Programmer for Sun. He gave Tomcat its name because he thought it'd be good animal on the book cover of an O'Reilly book. He never thought it would happen, and now that it does have a book, he said he's disappointed it's not an actual Tomcat (apparently it's a snow leopard?).

His point about Ant and Tomcat is that 1) something better than Ant will rock, so we should all be happy when something better comes along and 2) Tomcat was never designed (or tested) to be used in the environments its being used in (i.e. Nuclear Facilities). Good stuff - brain is full.

Posted in Java at Oct 09 2003, 11:29:22 PM MDT 7 Comments

Precompile your JSPs for Tomcat 4.x

Filip Hanik has provided a nice Ant script for pre-compiling JSPs. Its designed to be run after you've deployed your application to Tomcat. On my current project, it took 1 minute 30 seconds to compile all our JSPs - making it a candidate for new QA and Production deployments only. I'll be adding this to AppFuse's next release and verifying it actually works before I release. I know the compile works, but I want to make sure that my .java and .class files aren't rebuilt the first time I hit a JSP (I've seen this before). Also, you might want to checkout my issues if you run into problems.

Update: I've verified that this really does work - Sweet!

Posted in Java at Oct 09 2003, 03:41:47 PM MDT 3 Comments