On 3/29/07, Dale Newfield <[EMAIL PROTECTED]> wrote:
Matt Raible wrote: >> I don't understand why I should expect the dispatcher to find a >> "static" page that only exists deep inside the struts .jar? Do I >> need to extract part of the .jar someplace so that this can work? > > You're right, the StaticFilter just forwards to static resources. It > doesn't serve them up from JAR files. You could extract the dojo > stuff to your local project (keep the same path), or possibly add a > filter-mapping for /struts/*.I should have thought through this more critically when switching back from .xhtml to .html . I was hoping that this was the solution for making struts not broken with that extension... I tried to add extract the dojo stuff as you suggested: I added this to my build.xml (and had to upgrade to ant 1.7): <!-- Copy static .html files out of struts .jar so that the staticFilter can serve them --> <unzip src="${struts.jar}" dest="${webapp.target}"> <patternset> <include name="org/apache/struts2/static/**/*.html"/> </patternset> <mapper type="regexp" from="^org/apache/struts2/static/(.*)$$" to="struts/\1"/> </unzip> And now when I deploy my webapp includes another directory (struts) that contains all files that the staticFilter should be returning (with paths matching the urls with which they'll be fetched). But it still doesn't work. Same error and stack trace: There is no Action mapped for action name DatePicker. - [unknown location] Suggestions? I didn't quite understand your "add a filter-mapping for /struts/*" comment--to what should I be adding that filter-mapping? The staticFilter? It's triggering on the right url, but doesn't end up actually serving the static resource...
I meant for the struts filter. You could also change it from using /* to *.html. I haven't tried any of this myself (I'm not using Dojo), so I'm just throwing out ideas at this point. Matt
-Dale --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
