Matt RaibleMatt Raible is a Java Champion and Developer Advocate at Okta.

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.


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.

Failed upgrade to Struts 1.2.7

Yesterday I made an attempt to upgrade AppFuse to use Struts 1.2.7 instead of 1.2.4. Everything seemed to go smoothly until I started running my Canoo WebTests with JavaScript enabled. It turns out there's a major bug (IMO) in Struts 1.2.7 where the JavaScript rendered by Commons Validator can't handle the Struts' <form> tag in XHTML mode. I tried a nightly build (20050809), but it's not fixed there either, so I backed out the upgrade.

The interesting thing about Struts 1.2.7 is SpikeSource has certified this release. Are they not testing JavaScript as part of their certification test?

Another thing I attempted to upgrade yesterday was Canoo WebTest from build574 to build976. No dice - mainly because of issues with Prototype (I think). The worst part is everything works fine in a browser. Even worse is I still have a problem with build574, but it doesn't cause the tests to fail. Times like this make me wish Selenium was more polished and ready to use. I talked with some ThoughtWorkers last week and they said the Java driver is ready for a 1.0 release, but one of the committers wanted to make sure all language drivers were ready first (at least that's what I remember).

Posted in Java at Aug 10 2005, 11:17:35 AM MDT 9 Comments

Selenium would be a better solution for AppFuse tests, since it's more 'like' browsers behave, or what users do :).
Besides, using it would help Selenium be more polished, since I think AppFuse has a bigger user base than Selenium alone ( ever had :) ).

Posted by Ahmed Momombe on August 10, 2005 at 12:19 PM MDT #

I have enable Struts (1.2.7) Validator while XHTML was enabled in pages.

Here are some hints:

  • I haved tested it within weblogic 8.1 sp4
  • In tomcat 5.x I have this error <code>Error: formName has no properties Source File: http://localhost:8080/staticJavascript.jsp?empty=true</code> Line: 187
  • contract.jsp <xmp> <html:form action="/contract" method="post" focus="productType" onsubmit="return validateForm(this)" > . . . . <html:javascript formName="contractForm" method="validateForm" page="2" dynamicJavascript="true" staticJavascript="false" cdata="false" /> <script language="Javascript1.1" src="staticJavascript.jsp?empty=true"></script> </xmp>

    Note:I have created a new empty decorator.

    Posted by reza shahbazi on August 10, 2005 at 12:34 PM MDT #

Oh, and not to forget:
- It would be cool if this small <a target="_blank" href="">'Micarcle' from would get into Selenium. :)

Posted by Ahmed Mohombe on August 10, 2005 at 12:37 PM MDT #

I ran into this problem a little while also. The issue of course being that the JS code in validator is looking for the form's name, which doesn't exist in XHTML. I thought someone had a patch though... Anywho, I have a workaround, but I don't know whether the Appfuse tiles set up will let you or not... I simply put the <html:xhtml/> tag directly under the <html:form> one... Of course, my html:form tag is the first in the tile.

Posted by Patrick Dumontel on August 10, 2005 at 12:51 PM MDT #

I agree, it is a *major bug* if you use XHTML and the client side validation :-( Off the top of my head, the fix invloves changes to both commons validator as well as struts - so I assume you will need nightly builds of both to get it to work.

Posted by Niall on August 10, 2005 at 02:11 PM MDT #

IMHO, the Java driver for Selenium is NOT ready for primetime, at least if you're trying to use it in anything other than the most vanilla, use-their-built-in-Jetty mode. I tried fruitlessly for almost a week to get Selenium Java Driven mode working with our Tomcat-hosted application, and baffling intermittent timeouts and browser launching difficulties rendered it unusable. Reporting problems with Java driven mode to the Selenium list simply results in ThoughtWorks folks going "well, it works ok for me..."

The non-driven Fitnesse-style Selenium mode works just great, though.. I too wish the whole package was more polished.

Posted by Petey on August 10, 2005 at 02:24 PM MDT #

Thanks for bringing this struts 1.2.7 JavaScript issue to our attention. As of now, we have not included AppFuse + JavaScript testing as part of our standard suite to test struts. From our participatory testing initiative we are always looking to add better tests. We would be glad to work with you to add appropriate test cases.

Posted by Shao Fang on August 10, 2005 at 06:28 PM MDT #

My colleague and I are the posters of the XHTML bugs in question. I am currently using 1.2.7 for current development with bugfixes from:

Let me know if that's the only thing stopping you, as its pretty easy to patch struts and commons validator via the above bug links even if the changes have not made it to HEAD yet.

Posted by Haroon Rafique on August 10, 2005 at 08:31 PM MDT #

I found Matts Blog while googling my problem while upgrading to 1.2.7 . I understand that XHTML use form ID instead of name, but shouldnt the tag print out the id then? Right now my form neither have a name nor a id attribute. I also didnt found a way to disable XHTML mode, removing the relevant headers from the template wasnt enough. All in all, a quite ugly release i would say.

Posted by Marc Logemann on October 17, 2005 at 03:37 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed