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.

Struts 1.1 is on its way

Struts is definitely due to release 1.1 very soon. I've been using nightly builds for the last year - all very stable. There was a vote posted to the struts-dev mailing list tonight on releasing 1.1b3 as 1.1RC1 and it looks like it will pass. According to the committers, I'd expect an RC2 (with bug fixes only) in early February and a final release at the end of February. Luckily, all my clients have been confident in me and have not cared what version of Struts I was using - just that it worked. When I've found problems, I've patched them - good ol' open source. I haven't found any issues in quite some time - and when I have, the committers usually fix them the same day. Gotta love that kind of customer service. Show me a company that can do that with commercial software and I'll be impressed.

Posted in Java at Jan 17 2003, 11:21:11 PM MST Add a Comment

How to setup Tomcat to run as an NT Service

I couldn't help posting this, as I might need it someday. How to setup Tomcat as an NT Service, after you've already installed Tomcat.

Posted in Java at Jan 17 2003, 01:23:02 PM MST Add a Comment

Connection Timeout using Oracle with Tomcat

Hopefully one of you java-bloggers has seen this before and can assist. I've already sent this to tomcat-users, but since this blog seems to be more google-friendly than mailing lists - I like to post problems/solutions here. Hope you don't mind.

I am using Tomcat's JDBCRealm as well as a DBCP Connection pool. I am connecting to Oracle 9, and everything works fine - for about 24 hours. I've experienced this with MySQL and adding autoReconnect=true to the connectionURL fixed the problem. However, adding this to Oracle's connectionURL causes a "Cannot load JDBC driver class 'null'". My connectionURL is:

jdbc:oracle:thin:username/password@host:1521:sid

Posted in Java at Jan 17 2003, 09:34:18 AM MST 3 Comments

Inspire Teamwork

I don't know what her name is, but she's got good stuff to say. I read her post this morning about self importance and thoroughly enjoyed it. So much, in fact, that I sent it to a co-worker.

Next time, I won't belittle my collegue behind his back because he didn't use a stringbuffer instead of a string when he was concatenating, I will just send an email to the whole team, copying the section from "effective programming", articulating innocently but clearly how the strings work compared to stringbuffers, believe me, I know, i will feel whole a lot better. And when someone comes up to me with an idea, I will listen like my life depends on it, I will show my fear of not getting it, ask a stupid question or two and I will applaud them for their courage in sharing their ideas despite the fear of being ridiculed, I will work with them through their idea/hypothesis, no matter how much i might think it is stupid or impossible to achieve. We will arrive to that point together, but in the process, each one of us will connect, in a way where mutual trust is established, where we feel safe and be as stupid or as brilliant as we can be. And I guarantee you that we will be brilliant, because I have never seen an environment more fun to work or productive than that of a team of peers who understand, trust, respect, and and are humbled by one another.

I actually took her message to heart this afternoon and involved my co-workers with my ConvertUtils problems I was having. Simply discussing it with them helped me solve my problem. Communicate. Openly. It will make your job more fun - it did mine. We are already collaborating more from a little inspiration.

Posted in Java at Jan 16 2003, 07:15:50 PM MST 1 Comment

ConvertUtils and Indexed Properties

Now I have a new issue with ConvertUtils. I've resorted to creating a Form, rather than generating one from a POJO using XDoclet. In this form, I've added indexed properties, so that properties can be accessed and retrieved with an index.

So now I have getPropertyList() and setPropertyList(ArrayList) on my form. I also have getPropertyList(int index) and setPropertyList(int index, Property prop). However, when I add these methods, my ListConverter.convert method quits working! So now when I call:

BeanUtils.copyProperties(cmcfForm, c);

it returns null for the ArrayLists on my form? I don't get why, esp. since the methods have different signatures. It works fine if I remove the indexed methods.

Update: I solved my problem by removing the getPropertyList(int index) method. I had to add some funky stuff in the reset method of my Form to ready it for Struts auto-population, but it works. Specifically, I had to create an ArrayList for my child, and then populate it with empty child forms. This allowed setPropertyList(int index, Property prop) to work as expected. FYI - I don't think this is a Struts thing, but how webapps work. Anyway, I'm happy with how this works - as I know have indexed properties working for display and saving. Now I have to figure out saving parents/child in Hibernate (I've done it with struts-resume and MySQL, just not with Oracle). I've posted my problem to the Hibernate mailing list if you're really interested in my problem.

Next up, indexed property validation using the Validator. Should be oh so fun...

Posted in Java at Jan 16 2003, 11:03:31 AM MST Add a Comment

Struts and XHTML

There's an interesting thread over on the struts-dev mailing list. It started out debating whether to use comments (<!-- -->) or CDATA (<![CDATA[ ]]>) to hide Javascript code. I think this discussion was started by something I suggested yesterday on the struts-user list. Craig McClanahan had this to say:

What I also don't understand is why anybody is worried about generating XHTML markup for the current generation of popular browsers, none of which implement it correctly ... but that's a different issue.

What do you think? I think the best reason for generating XHTML (at this point) is that adding an XHTML doctype at the top of a page makes IE and Mozilla "snap" to standards-compliant mode. Rather than writing tweeks for each browser - the same code works in both. This is a real lifesaver when doing CSS positioning and DOM-based Javascript in pages. It's also really nice to be able to validate code.

Posted in Java at Jan 16 2003, 06:31:44 AM MST Add a Comment

Anonymous CVS taken offline at SourceForge

(2003-01-14 14:04:19) As of 2003-01-14, pserver-based CVS repository access and ViewCVS (web-based) CVS repository access have been taken offline as to stabilize CVS server performance for developers. These services will be re-enabled as soon as the underlying scalability issues have been analyzed and resolved (as soon as 2003-01-15, if possible). Additional updates will be posted to the Site Status page as they become available. Your patience is appreciated.

Posted in Java at Jan 16 2003, 06:25:13 AM MST Add a Comment

Snip Snap

I'd like to use SnipSnap to host/edit my downloads section. Write now I'm editing a plain old HTML file. I suppose I could use Roller, hmmm. I doesn't look like I can use SnipSnap on this site since it appears to only run as a standalone server, running on Jetty. I could try to run it on some crazy port or have two servers running on this site, but I prefer one.

Why do I want to use SnipSnap over Roller? For it's Wiki feature. Why don't I use a different wiki app (esp. since I did the research on them)? SnipSnap looks good - and I'm a sucker for eye candy. The rest of the wikis I reviewed are very plain. Sure I can customize them and do my own stylesheets and all that, I just don't feel like it. Who knows, maybe I will another day.

Posted in Java at Jan 15 2003, 10:12:50 PM MST 1 Comment

Java-based Forums and Free Software

I've always thought that Jive was a great product, especially when I first found it. It was free then, now it costs $450. It it worth it - yes! But it's tough to recommend this to clients when there are free alternatives. Here's one courtesy of Mathias Bogaert:

Discovered mvnForum, a JSP 1.1/Servlet 2.2 based forum application (GPL), which looks kinda neat...check out their demo.

I have this same problem at work. I told my project manager that I knew of three Bug Tracking systems: Bugzilla, JIRA and Scarab. I currently use Bugzilla for a client and I'm familiar and happy with it. I also use JIRA for Roller and XDoclet, and think it's a great piece of software. Even though I've never used Scarab, I installed it thinking that it was better than Bugzilla, and also b/c the guys from Apache are moving to it. After wrestling with the setup a bit, I got it working. Scarab's main goal seems to be ease of setup - they should take some lessons from Atlassian. Actually, we all should - I had JIRA downloaded/installed/running in under 5 minutes. Anyway, back to the point - I showed Scarab to my project manager and he went off to investigate. An hour later he came back and said he just didn't get it. I didn't have the bandwidth to investigate, and since I've never used it - we're going to use Bugzilla. I prodded and poked and tried to get JIRA; I even downloaded and installed the 30 day trial. No joy, free is what they want.

Speaking of free software, I'm inspired to do some work on Roller - especially with all the stuff that Dave and Lance have done lately. Also, my RSS feed seems to refresh old stories in Radio's aggregator, so I'm due for an upgrade. I hope to add some of the following features over the next week or so (when do we release 0.9.7?):

  • Encypted password support - both programmatically and using Tomcat's Realm. The way I've done this in the past is to create a LoginServlet that my form-based authentication maps to. This servlet does the encryption and redirects to j_security_check. I'll also include an option for an SSL-based login. Both password encryption and SSL will be off by default - and changes will be allowed in web.xml.
  • Remember Me. You're gonna love this - I sure do.
  • Remember Me in Comments. It's definitely needed if you do a lot of commenting. The question is - do you automatically do it - or allow users to say "forget me." Auto is easiest.
  • Add support for e-mailing comments and subscribing to comments when posting a comment.
  • Dig into XDoclet and make the upgrade to 1.2 Beta 2 - fixing the bug we have with Castor. I hope I'm familiar enough with how XDoclet works to make this happen. I looked through the code today and it should be working from what I can tell.
  • Upgrade to Struts 1.1 Beta 3.

Sheez! I just created a whole bunch of work for myself didn't I? Hmmm, now how do I schedule all this and get it done in a week? A late night, an early morning, a weekend? I can't decide... Oooh, here's an idea - Julie and Abbie are leaving for Florida next Thursday (I'm joining them Friday) - I could do it next Thursday night. Hopefully I can get it done sooner, but hopefully a lot of this can wait until then.

Posted in Java at Jan 15 2003, 09:47:48 PM MST 1 Comment

Conditional Task Execution with Ant

I'm trying to conditionally include my test jar files based on an Ant property. My problem is that the "if" attribute of the <task> element only accounts for the property being present or not. I'd love to be able to specify:

ant -Denable.cactus=false

But Ant seemingly executes my task if a property is present - so even though the value is false, it still executes. Any ideas? Here's my task:

<target name="copy-test-jars" depends="init" if="enable.cactus"
    description="Copy test-related JAR files to WEB-INF/lib">
    <echo>Copying Cactus, StrutsTestCase and JUnit JARs</echo>

    <mkdir dir="${webapp.target}/WEB-INF/lib"/>
    <!-- Copy jars -->
    <copy todir="${webapp.target}/WEB-INF/lib">
        <fileset dir="${strutstestcase.dir}" includes="*.jar"/>
        <fileset dir="${cactus.dir}">
            <include name="*.jar"/>
            <exclude name="commons-logging.jar"/>
            <exclude name="log4j-*.jar"/>
            <exclude name="servlet.jar"/>
        </fileset>
        <fileset dir="${env.ANT_HOME}/lib" includes="junit.jar"/>
        <fileset dir="${env.ANT_HOME}" includes="junit-noframes.xsl"/>
    </copy>
</target>

BTW, this XML was made web-savvy by the E2 Source Code Formatter - a must-have bookmark. I got this tip from The FuzzyBlog!.

Posted in Java at Jan 15 2003, 11:19:10 AM MST 6 Comments