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 "&amp". 294 entries found.

You can also try this same search on Google.

[ANNOUNCE] Hibernate 2.0.1 Released!

The Hibernate Team never stops producing. They've released 2.0.1, which fixes the following bugs:

Changes in version 2.0.1 (17.6.2003)
------------------------------------
* fixed some problems with new dialect-specific LIMIT clauses
* improved parsing of collection where attribute
* made one-to-many bags more efficient (they are really sets!)
* allowed type="calendar" for  properties
* fixed a bug with locking a versioned composite-id class
* refresh() may now take a transient instance
* added ProxoolConnectionProvider (Martin Crawford)
* fixed some minor JCA issues (Mike Mosiewicz)
* fixed a bug with FETCH and sorted associations
* improved performance of SchemaUpdate tool (Teodor Danciu)
* fixed a bug in Configuration.addFile(String) (Ken Geis)
* tidied up and documented hbm2ddl package (esp. Ant tasks)
* deprecated CounterGenerator in favor of IncrementGenerator
* improved logging during initialization

Posted in Java at Jun 17 2003, 07:14:37 AM MDT 2 Comments

[ANNOUNCE] XDoclet 1.2 Beta 3 Released!

From the XDoclet News page:

This is the last milestone towards our next big release. Over 130 bugs are fixed. For a detailed change log, please refer to XDoclet 1.2 Beta 3 Change Log.

Cool! Downloading now...

15 minutes later: I suspected this as soon as I saw the download. You'll need to download XJavaDoc 1.0 along with this release. I installed this release (+ xjavadoc) in my appfuse-based project at Comcast, and everything just worked. I dig it.

Posted in Java at Jun 13 2003, 07:28:36 AM MDT 6 Comments

[ANNOUNCE] Hibernate 2.0 Released!

Sweet! The Hibernate Team has lived up to their promise and released Hibernate 2.0 Final! [Download, Release Notes]

Posted in Java at Jun 08 2003, 10:36:54 AM MDT 6 Comments

Open XUL Alliance Site Goes Live

From The ServerSide.com, I became aware of the Open XUL Alliance.

The Open XUL Alliance site went live today.

The goal is to promote all things XUL (XML UI Language) and also to provide free test suites to help ensure interoperability between different XUL motors/browsers/runtimes and free, open-source show-case examples (aka blue prints) to demo the power of XML for creating UIs.

For now the Open XUL Alliance Site sports:

* XUL News Wire - Breaking News About XUL; also known as the xul-announce Mailing List

* The Richmond Post - Chronicle of the XUL Revolution; XUL News Weblog

* xul-talk Mailing List - Beyond Mozilla; Talk about XUL issues touching more than one XUL motor/browser/runtime

* XUL Lecture Series - Rich Clients, Rich Browser, Rich Portals and much more

* XUL Link-opida - Articles, FAQs, Cheat Sheets and much more

Use the XUL, XForms and SVG trio to build rich clients for web services today.

Visit the Open XUL Alliance

Posted in The Web at May 29 2003, 08:35:25 AM MDT Add a Comment

[ANNOUNCE] New Hibernate Versions (1.2.5 and 2.0 RC2)

Hibernate has released new versions of it's awesome persistence framework. I'm biased because I use it and it makes my life/job a lot easier (not to mention this site a lot faster). Not to mention that it's a finalist of JavaWorld Editor's choice awards.

Posted in Java at May 10 2003, 09:40:57 AM MDT Add a Comment

target="_blank" in XHTML 1.0 Strict

I've always wondered how to add a target="_blank" to my XHTML 1.0 Strict pages. Thanks to this article, I now know a nice workaround.

Much to the chagrin of Web designers everywhere, the HTML 4.0 Strict and XHTML 1.0 Strict recommendations of the W3C no longer include the target attribute of the <a> tag. The Transitional versions of the specifications still include it, but by definition, these specs are on the way out.

The short and sweet version is to use the "rel" attribute to your advantage.

<a href="document.html" rel="external">external link</a>

And then use this short script to key off this attribute for adding a target="_blank" (using the DOM).

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


Throw this in an "external.js" file and add it to whatever pages you need it in.

<script type="text/javascript" src="/external.js"></script>

This LOT more work than I expected, but since it's written up in an actual article, I tend to believe that this is probably the shortest path to making this happen.

Posted in The Web at May 04 2003, 06:13:06 AM MDT 1 Comment

Hibernate Upgrade (1.2.4 to 2.0 rc1) Redux

My last upgrade from Hibernate 1.2.x to 2.0.x was a little rocky, so I'm going to document it again today - this time with a Hibernate 2.0-enabled version of XDoclet, and code samples from last time. Today I'm upgrading from 1.2.4 to 2.0 rc1.

1. First, I downloaded Hibernate 2.0 rc1. BTW, I also updated to the latest version of XDoclet from CVS.

2. Next, I copied it to my project's lib directory, deleted bin, doc, and src directories. The only files I need are hibernate2.jar and (in the lib folder) c3p0.jar, cglib.jar, dom4j.jar, jcs.jar, jdom.jar and odmg.jar. One thing to note is with Hibernate 1.2.x, I didn't need dom4j.jar, jdom.jar or cglib.jar in my deployed WEB-INF/lib folder. However, with the new version, I did need to include them.

3. Then I updated lib/lib.properties and began changing my code with gool ol' Homesite.

4. Hey, step 4 is the same as last time! Edit build.xml file to pick up the new DTD. I changed <hibernate/> to be <hibernate validatexml="true" version="2.0"/>.

5. Using HomeSite, I did s/cirrus.hibernate/net.sf.hibernate/g for all my .java and .xml files. Don't forget to change your log4.properties and hibernate.properties files.

6. In hibernate.cfg.xml I changed cirrus.hibernate.sql.OracleDialect to net.sf.hibernate.dialect.OracleDialect. I also updated the DTD to 2.0 and moved all properties inside the <session-factory> element. Here's a sample hibernate.cfg.xml file from struts-resume.

7. In my ServiceLocator.java class, I changed the following from (this is so JUnit Tests can run w/o JNDI):

Datastore datastore = Hibernate.createDatastore();
datastore.storeClass(package.MyClass.class); // lots of these
sf = datastore.buildSessionFactory();

To:

sf = new Configuration().addClass(MyClass.class) // lots of these
                        .buildSessionFactory();

8. Time to bring Eclipse to the table. I refreshed the project and added the new hibernate2.jar to the "Java Build Path."

9. In my StartupListener.java (which initializes Hibernate for Tomcat), I changed the following code:

// Configure Hibernate.
try {
    Hibernate.configure();

    if (log.isDebugEnabled()) {
        log.debug("Hibernate configuration completed.");
    }
} catch (HibernateException h) {
    log.fatal("Error configuring Hibernate!", h);
}

To:

try {
    SessionFactory sf =
        new Configuration().configure().buildSessionFactory();

    if (log.isDebugEnabled()) {
        log.debug("Hibernate configuration completed.");
    }
} catch (HibernateException h) {
    log.fatal("Error configuring Hibernate!", h);
}

10. Changed all instances of readonly="true" to inverse="false" inverse="true" for XDoclet tags. Also changed role to name.

11. Removed length attribute from any <key-property ... /> elements in my .hbm.xml files. These were rudely put there by the ReverseGenerator. Not all my mapping files are generated by XDoclet, if I have one with a composite-id, I just create the mapping file manually. I also had the change the DTD manually in these files.

12. In my build.xml, I changed the SchemaExport class from net.sf.hibernate.tools to net.sf.hibernate.tool.hbm2ddl.

13. OK, here goes, my first attempt at compiling (honestly!). Darn - I forgot to save StartupListener.java - trying again (this time with "ant clean" first). Sweeeet - it worked!

14. Hmmm, some log messages I wasn't expecting. I forgot to change my log4j.properties file from cirrus.hibernate to net.sf.hibernate. I'll add this above (step 5) to make this how to more accurate.

15. Running persistence tests - since I keep my Oracle driver (ojdbc14.jar) in ${hibernate.dir}/lib, I had to move it to the new directory. Now this is a strange error:

[junit] 2003-04-29 13:14:50,968 INFO [main] Configuration.addClass(264) | Mapping resource: com/
.../persistence/ChangeRequest.hbm.xml
[junit] 2003-04-29 13:14:51,234 ERROR [main] XMLHelper$ErrorLogger.error(37) | Error parsing XML
: XML InputStream(19)
[junit] org.xml.sax.SAXParseException: Attribute "name" is required and must be specified for el
ement type "param".

My guess is that it's being caused by:

<generator class="sequence">
    <param>cr_master_sq</param>
</generator>

After reading the Hibernate2 Porting Guidelines, looks like I need to add a name attribute. Didn't the exception tell me that! ;0)

I'll update this post when I figure out the answer to my question on Hibernate's forums...

Update: I had to 1) upgrade my XDoclet JARs, and 2) replace the following XDoclet tags:

* @hibernate.id column="cr_id" unsaved-value="null"
*  generator-class="sequence" generator-parameter-1="cr_master_sq"

with:

* @hibernate.id column="cr_id" unsaved-value="null" generator-class="sequence" 
* @hibernate.generator-param name="sequence" value="cr_master_sq" 

Now I'm experiencing this issue.

Update 2: I discovered (from Gavin) that readonly="true" is the same as inverse="true". I've updated step 10 above, and now my upgrade is complete!

Posted in Java at Apr 29 2003, 02:52:07 PM MDT Add a Comment

Making your tables more accessible?

A question was asked on the display tag user list recently. Basically, the user wanted to add onmouseover and onmouseout events to the <tr>'s in a display-tag rendered table. Today, I decided to whip up a quick example of how to do this in a DOM-compliant browser. Just add an "id" attribute to your table, or use document.getElementsByTagName("table") (selecting the appropriate table in the array), and then put the following JavaScript block below your table. Of course, you must define a "tr.over" class in your CSS.

<script type="text/javascript">
    var table = document.getElementById("testTable");
    var rows = table.getElementsByTagName("tr");
    for (i=0; i < rows.length; i++) {
        rows[i].onmouseover = function() { this.className='over' };
        rows[i].onmouseout = function() { this.className='' };
    }
</script>

Now for an example:

       
       
       
       
       
       

Later: You can take this one step further and add an "onclick" event so that the user can edit the record the row is referring to. Let's pretend you have a link in the first <td> of the table. Inside this link is the recordId for that row. Adding an onclick to the row makes it easy to route the user to the details page for the record.

rows[i].onclick = function() {
    var cell = this.getElementsByTagName("td")[0];
    var link = cell.firstChild;
    var id = link.firstChild.nodeValue;
    location.href='URL to details page?recordId='+id;
    this.style.cursor="wait";
}

Posted in The Web at Apr 22 2003, 04:55:25 PM MDT 25 Comments

MailTo: Links

I created a mailto: link today for our app at work. I used this page and Hiveware's Enkoder Form to hide the e-mail address from spammers. I even added a little browser information - since clicking on the link will send an e-mail to the help desk. Pretty cool - view source to see how I made the link below work.



Posted in The Web at Apr 16 2003, 01:05:01 PM MDT Add a Comment

My Roller To Do List

I'd like to add some additional features to Roller. Don't worry, I won't add them for a couple weeks (if I add them at all - being a Dad and husband is way more fun and satisfying than being a developer). Dave is imposing a code freeze this weekend and I don't want to mess anything up for the 0.9.7 release. Especially since we really need to get a release out - there hasn't been one since November 2002! Here's what I want to add after the release:

  • Joe Hewitt-style comments. Big surprise - it doesn't work in Opera 6/7. I'm not surprised as I despise that browser and pity anyone that uses it.
  • Use Tiles for the Editor layout and implement the Validator for validating fields. With the latest XDoclet, this will be a breeze, but could cause issues with the UI, so a good idea to implement after the release. A good strategy for implementing this would be to write a bunch of test cases with StrutsTestCase for Actions and Canoo's WebTest for JSPs.
  • Possibly this idea for highlighting entries added in the last few hours.
  • Implement struts-menu as an optional menu in the Editor to reduce the number of clicks to get to a page.

Unfortunately, none of these are on the fix me, I'm a popular bug list. Aaaahhh, the beauty of open source development: 1) you don't have to work on it at all if you don't want to, 2) you only have to implement the features you want, and 3) there are no deadlines.

Of course, if Roller's goal is to be the most popular Java-based blogging software, then squashing the bugs on the popular list is probably the best thing to do, but I don't think that's Roller's goal. I believe Roller's goal is to provide a learning environment for Java developers to tinker with. Besides, I think blojsom will win the popularity contest. Why? Because it's easy to setup and Roller isn't. Roller doesn't have chance until it can be setup in 5 minutes or less.

Posted in Roller at Apr 16 2003, 10:24:32 AM MDT 2 Comments