Oh the joys of html embedded in html! Try again... preview preview preview
Tim Azzopardi wrote: > > > Michael Horwitz wrote: >> >> There are two possible ways to work around this (at least I think so - I >> have done no 2 for SpringMVC, but have not yet tried struts): >> >> 1) Use the packages init parameter on the FilterDispatcher and include >> dojo >> as a package. More details in the FilterDispatcher javadoc: >> http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html >> >> 2) Build a filter that forwards all requests not for dojo to the >> dispatcher >> and set the dispatcher to only operate on forwarded requests. I have >> coded >> an include/exclude filter that allows me to do this. Let me know if you >> are >> interested in the code and I will post it up here. This method has the >> advantage that you can code filters to only operate on active content, >> thereby shortening the filter chain for static content. >> >> Mike. >> > > > I had no need to add the packages init parameter on the FilterDispatcher, > because I'm now using dojo that comes with struts2 (which according to the > struts2 doc is 0.4, the latest to date). > > To begin with, I was naively (doh!) assuming I could just say > < a href='/struts/dojo/dojo.js"'>click here for dojo source B< /a> > > But you have to allow struts2 to do its work by using struts tags > (obviously!), > < a href='<s:url value="/struts/dojo/dojo.js" />'>click here for dojo > source B< /a> > > (or more verbosely: > < s:url id="bozo" value="/struts/dojo/dojo.js" /> > < a href='<s:property value="%{bozo}"/>'>click here for dojo source A< > /a> > ) > > and webwork does indeed serve it straight out of the struts2 jar as > described in the doc > (http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html) > > BUT I still cannot make my simple dojo *button* work. It fails at this > javascript line: > dojo.require("dojo.widget.Button"); > which tries to include > "struts/dojo/src/widget/templates/HtmlButtonTemplate.html" > and I get the good old message > "There is no Action mapped for action name > struts/dojo/src/widget/templates/HtmlButtonTemplate." > > > So, could you post your filter code, so I can give that a go? > > > > > > -- View this message in context: http://www.nabble.com/appfuse-1.9.4-webwork-migration-to-struts2-tf2761053s2369.html#a7702367 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
