In appfuse 1.9.4, urlrewrite.xml redirects the standard webwork validation.js
to the appfuse specific one.
    < !-- Override default validation.js from WebWork -->
    < rule>
        < from>^/webwork/css_xhtml/validation.js$</from>
        < to type="forward">/template/css_xhtml/validation.js</to>
    < /rule>


E.g. in saveUser.html, the script reference
 < script src="/myapp/webwork/css_xhtml/validation.js"
type="text/javascript"></script>
actually serves up the validation.js from, for example
%TOMCAT_HOME%\webapps\myapp\template\css_xhtml
rather than the validation.js in the webwork jar.

Now that I have converted to struts2, this mechanism does not seem to work
anymore (the standard struts2 validation.js is used) even though I have
changed urlrewrite.xml to 
    < rule>
        < from>^/struts/css_xhtml/validation.js$</from>
        < to type="forward">/template/css_xhtml/validation.js</to>
    < /rule>

The script reference on the saveUser.htm page
< script src="/myapp/struts/css_xhtml/validation.js"
type="text/javascript"></script>
serves the original struts2 validation.js

How do I know?
1) Well I put alerts at the top of the three methods in validation.js and
these are not appearing (but do appear when I do the same in webwork
version)
2) If I point the browser at
http://localhost/myapp/struts/css_xhtml/validation.js then I see the struts2
version
3) If I point the browser at
http://localhost/myapp//struts/css_xhtml/validation.js (not the double
slash) then I see my modified version with the alerts.

Does the custom validation.js redirection work ok in appfuse2?

-- 
View this message in context: 
http://www.nabble.com/appfuse-1.9.4-webwork-migration-to-struts2---urlrewrite-problem--tf2774540s2369.html#a7739640
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to