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
- Jack's Mohawk
- LinkedIn Cuts 10% (a.k.a. The Journey is Over)
- Happy Birthday Abbie!
- Moving from Spring's XML to Annotations in AppFuse
- Free Maven Training in New Orleans on Election Day
- AppFuse Light ยป AppFuse, Maven Archetypes and Shared Web Assets
- Great Weekend in Montana
- Colorado Software Summit 2008 Wrapup
- RESTful Web Applications with Subbu Allamaraju
- Core Animation with Bill Dudney
Posted by Dimi on January 16, 2004 at 04:57 AM MST #
Posted by javaok on June 28, 2004 at 11:39 PM MDT #
Posted by zqczqczqc110 on March 31, 2005 at 09:53 PM MST #
Posted by Discount Cruise and Vacation on September 07, 2005 at 07:42 PM MDT #