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 "roller". 153 entries found.

You can also try this same search on Google.

How much CPU Power does a Java/Tomcat app need?

I tried posting the following to the tomcat-user list, but after not seeing it show up for 2 days, I'll just try it here.
----

I have developed a webapp that uses basic open source stuff (struts, hibernate,
etc.).  I've been developing/testing it on the following platforms - where it
works fine and runs lickedy-split:

OS X 10.3, 1.33 GHz, 1 GB RAM
Windows XP, 2.6 GHz, 1.5 GB RAM
Windows 2000 Server, 1 GHz, 512 MB RAM
Windows 2000 Server, 1.5 GHz, 256 MB RAM

All of these are running Tomcat 4.1.29 or 4.1.12.  I recently tried to deploy
it to the "test web server" (Windows 2000 Server) at my client and it runs 
dreadfully slow.  It takes almost 30 seconds to load a page.  The main difference
is that the test web server has a 667 MHz CPU.  It has 512 MB RAM, and we 
upgraded it to 1 GB, but that didn't help at all.  

I've recommended we get a faster CPU for the test web server, but I wanted to
confirm that this could be the source of the problem.  On this server, and the
1.5 GHz/256 MB RAM machine, IIS is integrated with Tomcat.  All machines are
running JDK 1.4.0 or above.

Any help is appreciated.

Posted in Java at Feb 05 2004, 07:38:05 AM MST 13 Comments

JavaBlogs and Roller's duplicate post problem

Charles has figured out why JavaBlogs gets duplicate posts from Roller-based blogs. And Dave proposes a solution:

I just now changed the JRoller "absolute URL to site" setting to force the domain name to jroller.com. The setting was blank before.

Without this setting, the JRoller feeds were using whatever hostname was requested at cache refresh time. So if the first request after the cache timeout was for freeroller.net then the GUID's in the RSS feed would read freeroller.net until the next cache timeout.

This site was missing the absolute URL to site setting as well, so I changed it to http://raibledesigns.com. I'll try adding myself back to JavaBlogs aggregator and hope that works!

Posted in Java at Feb 02 2004, 08:46:25 AM MST 3 Comments

What's new in Tomcat 5

Want to know what's different between Tomcat 4 and Tomcat 5? If so, you should check out this article. I haven't read it (yet), but I hope to soon. Today, I was planning on working from home, plowing through my stuffed head and headache with the power of DayQuil. However, Julie had to run into work (she stayed home with Abbie yesterday, who is also sick). So Abbie and I are going to be sickos together all morning. The problem is that Abbie doesn't know she's sick - she's still happy as a pig in sh*t and wrecking the place. I'd better go and stop her...

Oh wait - Telletubbies just came on - she's mesmerized, that gives me a half hour. I'd love to work on AppFuse, there's never been more stuff I'd like to integrate. Here's a list of stuff waiting for SF's CVS to get it's act together:

  • Start integrating Spring.
  • Various bug fixes as reported by users.
  • Charles' persistent cookie strategy.
  • WebTest patch to work with Ant 1.6.0.
  • Figure out how to run AppFuse on JBoss - thanks to Rick Hightower and Brian Topping (on the roller-user mailing list) this should be pretty easy.
  • Figure out how to run AppFuse on Orion - I got an e-mail yesterday with some hints, so this shouldn't be too hard either.

As far as SourceForge's CVS, if you were to checkout AppFuse right now, you'd get the latest code, but you'd also get a bunch of files I deleted ages ago. I submitted a bug - here is the response I received:

This issue (file present both Attic and non-Attic) would have been caused by a file removal between the time of our full repository sync and the update sync; or by outdated data being present after our initial sync (due to a sync bug) -- both possible cases with our recent systems upgrade. We are presently in the process of generating a list of such duplicates (using a set of scripts we wrote) and will perform a clean-up of this issue once the script run completes. Additional information will be posted to this request no later than 2004-01-30. Your patience is appreciated.

Back to babysitting, Abbie's getting bored with Telletubbies.

Posted in Java at Jan 29 2004, 09:21:48 AM MST Add a Comment

Turn off sessions in your JSPs

One of the tips I picked up in J2EE Design and Development was to turn off automatic session-creation in your JSPs. So I tried this today on my project, and it doesn't seem to work. Basically this involved putting the following at the top of your JSPs:

<%@ page session="false"%>

I did this by adding this to my taglibs.jsp, which is included in every other JSP - so it should affect all my JSPs and prevent a session from being created on my welcome-file - right? Not according to Tomcat's Manager application - it still increments the number of sessions as I hit the welcome page with different browsers. Am I doing something wrong?

I'd love to get this working - so sessions are only created when a user logs in. Those JSPs that need a session, I'll override the default with session="true". I often see a whole bunch of sessions on the wiki and roller apps on this site - and in reality - a session should never be created, unless I login. At least I think that's how this is designed to work...

Posted in Java at Jan 22 2004, 11:23:18 AM MST 4 Comments

Poor Open Source Developers

Richard seems to think that most open source developers are like starving artists:

While a few make really good money selling consulting and training and other services, the vast majority of open source developers don't make anything.

For some reason, I don't believe this. The open source projects I participate in, as well as the ones I admire and use - all seem to have developers that are gainfully employed and making money. Of course, this may just be a Java open source phenomenon.

To do open source, you have to have a day job. You can't expect open source to feed your family or even your cat for that matter. As I said there are exceptions, but most open source developers do it for the love of writing software. While commercial software developers do a great job of feeding their families, open source developers do a better job of feeding their minds. In the end, you have to ask yourself which is more important: The things you own or freedoms you have.

Very good points. I dig working on AppFuse, as well as Roller, Struts Menu, and the Display Tag because I can do whatever I want. I can implement silly features like Clickstream and I don't have to ask anyone if it's a good idea (I'm still debating this).

Back to my point though. I firmly believe that most Java Open Source Developers are gainfully employed and not starving artists. Part of this comes from the fact that most of the big projects I work with (i.e. Struts and Hibernate) have some smart folks on staff, and the popularity of their projects has provided them with more opportunity, hence they're employed.

Personally, I do open source because I want to learn. I want to write code that gets scrutinized by the masses. As an independent consultant, I rarely get another person looking at my code - so I turn to the community by opening my code (that I use on a daily basis) to other developers. Overall, having others look at my code has resulted in much higher quality software for my clients, and has helped me learn a lot in the process as well.

I also look at open source development as a good marketing campaign - here's what I can do, hire me. This has proved very successful so far. Hence, my formula: Open Source Development = good marketing = gainful employment.

Posted in Java at Jan 22 2004, 06:42:57 AM MST 4 Comments

Mock Shmocks!

Let me start this post by saying that I've never used Mock Objects in my JUnit tests. Simon digs it, crazybob is an advocate and so is the gang that wrote Open Source Programming. In fact, the OSP book says that your unit tests should only take a couple of seconds to run! A couple of seconds!? Mine aren't that fast, which definitely makes me think I should look at Mocks to try to speed things up.

However, there is a method to my madness. Almost all my tests depend on a database connection and use DBUnit to populate the database before running. This can be time consuming, but it's not too bad for what I'm getting: real tests that verify the environment, not just the code. I just ran all tests in the application - 8 minutes 7 seconds - for 165 JUnit/Cactus tests and ~25 WebTest (JSP) tests.

If I did use Mocks, I wouldn't have discovered all the bugs in my code this week. When migrating from MySQL to DB2, I found that some things worked on MySQL, but they didn't on DB2. I modified the code, doing some tweaks to make Hibernate happy, and voila - now everything works on DB2 and MySQL. Furthermore, all my errors occurred when running my app in the container, and when I used simple JUnit tests (on my Managers) to test the same logic, it worked.

Who knows, I'm definitely learning new stuff everyday. Maybe it's possible that Mocks could do all this, but testing the production environment seems pretty important to me.

Posted in Java at Jan 21 2004, 06:34:28 PM MST 5 Comments

JavaBlogs really likes me...

JavaBlogs seems to really like my RSS feed - I keep showing up on the main page twice. This means that something is probably wrong with my feed, so I've done the right thing and disabled my Java feed for the time being. I'll add it in when I rev to the next Roller version - which will hopefully only be a week or two. I'll leave this in the Java category to see if it shows up over there. If so, I guess I'll have to delete the feed entirely instead of just disabling it.

Posted in Java at Jan 19 2004, 03:15:19 PM MST 2 Comments

DJUG Meeting: The Future is Swing

I attended the Denver JUG meeting tonight and definitely enjoyed myself. It helped that I got to see an old friend, but it was also a nice refresher on XSL-FO and a great overview on J2EE UI choices. The basic concepts meeting was on XSL-FO, which as far as I know, is mainly used for creating PDF documents from XML content. Apache's FOP is widely used for doing XSL-FO in Java.

So here's a question for you - if I want to produce PDF versions of my resume (in struts-resume), which technology should I use? I know it'd be fairly easy with XSL-FO, but what about JasperReports? I'd like an easy way for users to be able to upload new "templates" for the PDF version of their resume, so FO might be the way to go. In addition, I'd also like to implement the PDF-rendering technology that I'll likely use on a real-world project. Are there some good APIs to use?

I did some XSL-FO work a couple of years ago and it seemed pretty cool, but it required a lot of trial and error to get things looking right (as is the case with most XSL). My favorite tool at the time was RTF2FO, which allows you to create a Word document with the look you want, save it as an RTF, and then convert it to a FO (.fo) document. Pretty slick stuff - it looks like they have a free trial and it's only $50/machine. The project I used it on was only 3 weeks, so the trail version did me just fine.

The main presentation was delivered by David Curry, who seemed to be an expert on J2EE UI choices.

David Curry is Director of Systems Development for ADP/SIS, part of the ADP Brokerage Services Group. He and his team use J2EE with DHTML, XML and Swing to develop mission-critical desktop productivity applications for brokerage and bond trading firms.

The main thing that impressed me was that David has been developing the same application since 1992. The app started out as a PowerBuilder desktop app, and moved to an HTML app, then DHTML - and now they're moving to Swing. They recently chose Swing (with the help of JGoodies) over their DHTML interface because 1) Java Web Start makes it much easier to deploy and 2) it's much more responsive for users on dial-up connections. David mentioned that it's a good idea to break your app into many separate jars so users don't need to update the entire app for new releases (a.k.a. JNLP Versioning).

I've often argued that you can make a webapp do almost anything a desktop app can do, but I can't argue with the bandwidth thing. It does take a long time to download a webapp that has a lot of JavaScript, CSS and images that make it rich. David mentioned that Gartner expects HTML interfaces to subside in the coming years, and for rich UIs (like Swing and SWT) to become more the norm. In one sense, I hope they don't - the only reason I'm in this industry is because of my HTML/CSS/JavaScript skills. It's all I know. Sure, I could probably learn Swing, and I might even like it, but I'd rather not. Learning Spring, WebWork and Tapestry sounds like more fun. Of course, if they can support a Swing UI, then I've lost nothing by learning them. I know WebWork does, but what about Tapestry? Is it view-technology-agnostic?

On the other hand, Swing does have some advantages:

  • There aren't as many choices. Desktop apps are desktop apps, they should look like them. A lot of webapp developers (including myself) can get caught up in making a webapp look like a great website. The web offers so many more choices for look-n-feel that it's hard to decide which is right. I spend more time tweaking UI code (JavaScript and CSS) than doing anything else.
  • Java Developers can develop the UI. In my experience, I have a rare set of skills - a strong HTML/CSS/JavaScript background, and a firm grasp of Java. The industry rumor is that there's HTML developers and Java Developers, but they're rarely the same person. David mentioned that there team is nicely consolidated to 6 developers - and everyone knows how to program in all layers. This sounds like smart management to me, moreso than Swing makes your team more efficient.

The other side of the coin is that Swing will never replace many webapps. For instance, it could never replace Roller. Why would readers want to download a Java app to read this site. However, since most of you probably use client-side aggregators and client-side editors, maybe the shift to desktop apps has already started...

Posted in Java at Jan 14 2004, 10:09:17 PM MST 6 Comments

MD-5 password encryption and the "secret key"

According to a post on the Struts User mailing list, it's possible to encrypt a password using MD-5 (which is one-way), stuff it into a cookie, and then use a server's "secret key" to verify that it's a good one. Since I'm guilty of storing base64 encrypted passwords in cookies for a "Remember Me" feature, I'd love to figure out a more secure way of doing this.

So the question is - is it possible to implement "Remember Me" in J2EE in a secure way?

Setting the cookies on a certain path (i.e. /roller/security/) works, but not on Tomcat 5. I want to securely set my userid/password/rememberMe cookies at the root level of my app, map a filter to login.jsp (dispatcher = forward for TC 5) and be done with it.

Posted in Java at Jan 14 2004, 10:27:04 AM MST 6 Comments

AppFuse on DB2 and WebSphere

I did some trial-and-error this morning, and with the help of a lot of handy-dandy unit tests, I got [Appuse working on DB2|AppFuseOnDB2]. I learned that I need to figure out how to create a database with page size = 8 by default - anyone got a SQL script to create DB2 databases (with reasonably sized table spaces) lying around?

Next up: Getting AppFuse running on WebSphere 5.1, this should be fun. Especially considering that they only seem to support .ear files, not .war files. I've only glanced at the thing for 5 minutes - any advice/links would be awesome.

Posted in Java at Jan 12 2004, 10:23:11 AM MST 9 Comments