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 FAQs

Every Struts Developer should probably read Sciosorks Struts FAQ. Good stuff there. Bookmark it and use it.

I rode my bike into work for the first time this year. I got lost, so it took me 20 minutes longer than it should have. Door-to-door: 1:45. I wonder how long it'll take me to get home tonight.

Posted in Java at Apr 02 2003, 11:01:05 AM MST Add a Comment

Dial-Up: 28.8

That's right, I'm posting this message on dial-up since my ISP can't fix my internet connection. Today they said they'd send someone out in a week. That sucks - dial-up for a week. Oh well, productivity will rise, blogging and reading of blogs will decline - which can't really hurt. The choke hold will come when one of my friends sends me the 1MB attachments that they're used to sending. The worst part is that I'm doing a WebEx presentation for the Struts Training class this week and I have to go into my office to do it, rather than in the comfort of my own home. Luckily, the guys I work for are letting me use my work computer - thanks gents!

Posted in Java at Apr 01 2003, 10:49:26 PM MST Add a Comment

Saving Sessions in Tomcat

Dominic has provided a great link for storing your user sessions in a database with Tomcat. This could be very helpful in a production Tomcat environment where you need to persist your sessions in case you reboot a server. In most of my apps, I try to keep session-scoped objects to a minimum, so in most cases - I don't need to save the user's session. Good link regardless though - thanks Dominic!

Posted in Java at Apr 01 2003, 09:19:03 AM MST Add a Comment

JDK 1.4.1 - Memory Leak Bug in StringBuffer.toString()

I use StringBuffer.toString() a fair amount in my code. Did you know there's a significant memory-leak bug in JDK 1.4.1?! Yikes - if you're experiencing memory issues, you might try back-pedalling to 1.4.0.

Posted in Java at Mar 31 2003, 09:46:55 AM MST Add a Comment

[Tomcat 4.1.x] Authentication Best Practices

From the tomcat-user mailing list, John Swapceinski brings us Authentication Best Practices. Lots of scriptlets in his JSPs, but nevertheless, very good information.

Posted in Java at Mar 31 2003, 08:18:45 AM MST 1 Comment

Cool TagLib Document

I found this gem on the strut-user list tonight.

* TaglibDoc
    This is a JavaDoc-like set of html and css files for browsing the
    taglib documentation.  Here's what this target does (I ran this
    about 15 minutes ago):

      http://struts.sourceforge.net/struts-atlanta/taglibdoc/

* TaglibReport
    This target will generate a grid-like view of the taglibs and their
    attributes so that you can see every tag in a typical package side
    by side.  This helps when comparing which tags implement a certain
    attribute, by allowing you to view them side by side and not have to
    look up each tag by hand. (also about 15 minutes ago)

      http://struts.sourceforge.net/struts-atlanta/taglibreport/

Project by Mohan Kishore, posting by James Mitchell.

Posted in Java at Mar 30 2003, 07:23:25 PM MST 2 Comments

StrutsCX Article

The stats on the bottom right of this site are definitely wrong. At the time of this writing, it says I've had 4,351 hits today. Yeah right. I did, however, discover that I have been linked to in a major article and I'm getting a fair bit of traffic from that. The article is called Generate Web Output in Multiple Formats and Languages with StrutsCX and is hosted by DevX.com.

Why did the author include a link to this site? Because I'm hosting a demo of the StrutsCX application. I hope to use ideas from this app when I develop the XSL/XML rendering of resumes for my struts-resume app that I may/may not ever finish. I do plan on finishing it someday, but since I'm my own client - there's no deadline, no pay, and little motivation. But it is very cool to have my own reference application that I can play with to try new stuff. I definitely dig that. I can guarantee that as soon as I get indexed property validation working, it'll be in there - and that will also motivate adding many child items (i.e. skills, education, etc.) to the resume item.

Posted in Java at Mar 30 2003, 12:30:10 PM MST Add a Comment

WebWork Tutorial makes it look easy

I have to admit that this webwork tutorial makes WebWork look easy. In comparing this to Struts, it seems as if the Form and Action are the same thing. I wonder if I could use BeanUtils.copyProperties(wwAction, POJO) like I am with Hibernate/Struts currently.

The funny thing is that XDoclet has made it so easy (IMO) that I don't write ActionForm's anymore. All I really write is Actions, JSPs, DAOs and Services (a.k.a. Managers). So, with my current architecture I'm using, it actually looks like more work to use WebWork's Actions than Struts Actions. Especially since I have to write my validation in my Action. The XDoclet/Validator combo makes this super simple with Struts (and would with WW if they'd adopt it ;-). The only time I've been writing forms lately is when I have a form with indexed properties. Then I create a childForm that extends the generated form and has the appropriate accessors/mutators for the indexed properties.

The one thing the article does bring to light is how much cleaner Velocity is. JSP 2.0 will make JSP's a lot easier, but Velocity looks like it's already there. The one thing that worries me about using Velocity is that, according to their homepage, they haven't had a release in 8 months and their last release was a Release Candidate. What the?! Seems like someone might be dropping the ball on that project.

Posted in Java at Mar 30 2003, 11:26:58 AM MST 6 Comments

Hibern8 IDE

Max Andersen created a quick'n'dirty Hibern8 IDE in less than 3 hours tonight. For your viewing pleasure, he also created a viewlet. Very cool Max!

Posted in Java at Mar 29 2003, 11:58:47 PM MST 4 Comments

Struts Training: Week 4

I missed last week (Week 4, PosgreSQL), but I'm back this week - ready to report. I'm presenting next week on "remember-me" and XDoclet, so I'm working frantically trying to get AppFuse up-to-snuff to use as a lab template. Hopefully, I'll have that done by tomorrow night, as well as the lab and presentation.

Today's presentation is from James Turner on Indexed Properties and Validation. Awesome - I need this in my day job's project starting next week! Good timing, eh?!

So how do you use indexed properties in Forms? Two ways: Simple arrays of strings and arrays of beans (recommended). Here's a good tip - if you're using DynaActionForms, you can access a property in JSTL using {form.map.propertyName}. I did not know that - thanks James! Lots of good stuff in this one (too much to write down), I hope this preso is available online and a demo app goes with it. To validate simple array of strings, add indexedlistProperty to your <field> in validation.xml (you must also specify the property). If you're validating beans, use property="propertyName" and indexedListProperty="beanName".

However, do you really want to require all fields of your child beans? No, probably not. You (most likely), just want to require fields if some fields are populated. Struts provides us with the requiredif validator. No JavaScript validation exists for requiredif at this time. Hmmm, I wonder if XDoclet can generate indexed validation rules. Here's an example of how to do this with the current 1.1 RC1 Release.

<form name="myForm">
  <field property="lastName" indexedListProperty="person" 
    depends="">
    <arg0 key="label.lastName"/>
  </field>
  <field property="firstName" indexedListProperty="person" 
    depends="requiredif">
    <arg0 key="label.firstName"/>
    <var>
      <var-name>field[0]</var-name>
      <var-value>lastName</var-value>
    </var>
    <var>
      <var-name>fieldIndexed[0]</var-name>
      <var-value>true</var-value>
    </var>
    <var>
      <var-name>fieldTest[0]</var-name>
      <var-value>NOTNULL</var-value>
    </var>
  </field>
  ...
</form>

Note that the [0] is NOT an indicator of which indexed property to validate. RequiredIf is powerful but ugly, so James wrote something better. Unfortunately, it's too late for 1.1 and will be added for the 1.2 release. Sounds like most folks that use the Validator will be using a nightly build for awhile ;-). The new validator is called "validwhen," and looks as follows:

<field property="firstName"
  indexedListProperty="dependents"
  depends="validwhen">
  <arg0 key="dependentListForm.firstName.label"/>
  <var>
    <var-name>test</var-name>
    <var-value>((dependents[].lastName == null) or
                (dependents[].firstName != null))
    </var-value>
  </var>
</field>

Fricken sweet! James is sending me the code - cool! This will make my life soooooo much easier next week. Status of Struts 1.1 from James: they're working on getting the commons packages to a release state. Slides from today will be available at strutskickstart.com later this afternoon.

Posted in Java at Mar 29 2003, 09:32:28 AM MST 4 Comments