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 by Dimi on January 16, 2004 at 11:57 AM MST #
Posted by javaok on June 29, 2004 at 05:39 AM MDT #
Posted by zqczqczqc110 on April 01, 2005 at 04:53 AM MST #
Posted by Discount Cruise and Vacation on September 08, 2005 at 01:42 AM MDT #