Monday February 24, 2003
Struts Update: 1.1 beta 3 to 1.1 RC1 While upgrading Hibernate last night and this morning, I also upgraded Struts. Now I'm having some issues there, so I'd better document those too. First of all, the following line doesn't seem to be rendering any client-side JavaScript anymore:
<html:javascript formName="resumeForm"
dynamicJavascript="true" staticJavascript="false"/>
Update 1: Nevermind, it seems my Internet connection went dow while starting Tomcat. Since the Digester couldn't validate the Struts' XML configuration files with their respective DTDs, it stopped them from loading.
Update 2: This turned out to be a legitimate issue. Adding cdata="false" to the above tag enabled the browser to see the JavaScript by removing the "<![CDATA[" after <script type="text/javascript">
Revisiting the Hibernate upgrade, I needed to add dom4j.jar to WEB-INF/lib to solve java.lang.NoClassDefFoundError: org/dom4j/Node.
Now I'm getting:
java.lang.NoClassDefFoundError at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:571)
What the @#$*%#? hibernate2.jar is in WEB-INF/lib??
Update 3: I had to add cglib.jar to WEB-INF/lib as well. Now back to an issue I'm having with the Validator where client-side validation is working when I click "cancel" (as in, it's disable), but server-side is kicks in. Argghhhh!
Update 4: I found an issue (via the struts-user list) about using the Validator with LookupDispatchAction. It basically doesn't allow you to control validation on a method level, so I've hacked the following workaround.
I changed <html:cancel> to be <html:button> and added onclick="cancel()", where cancel() is the following JavaScript method:
<script type="text/javascript">
function cancel() {
location.href = '<html:rewrite forward="cancelUser"/>';
}
</script>
The "cancelUser" forward points to "/editUser.do?action=Cancel", which is an action-mapping that doesn't have validation (validation="false") and this hits the "cancel" method on UserAction and routes appropriately.
Phew - I'm beat. I never realized being an upgrade-happy-keyboard-monkey could be so much work!
Posted in Java
at Feb 24 2003, 11:10:46 AM MST
4 Comments
Search This Site
Recent Entries
- Secure JSON Services with Play Scala and SecureSocial
- My What's New in Spring 3.1 Presentation
- Twitter's Open Source Summit: Bootstrap 2.0 Edition
- Refreshing AppFuse's UI with Twitter Bootstrap
- 2011 - A Year in Review
- Upgrading AppFuse to Spring Security 3.1 and Spring 3.1
- What have I been working on at Taleo?
- Our Engaging Trip to Paris and Antwerp
- My HTML5 with Play Scala, CoffeeScript and Jade Presentation from Devoxx 2011
- Deploying Java and Play Framework Apps to the Cloud with James Ward
Posted by Dimi on January 16, 2004 at 05:57 AM MST #
Posted by javaok on June 28, 2004 at 11:39 PM MDT #
Posted by zqczqczqc110 on March 31, 2005 at 10:53 PM MST #
Posted by Discount Cruise and Vacation on September 07, 2005 at 07:42 PM MDT #