Hello, I tried the Filter but got follow error. Did I missed something? I added filter mapping in xml...
[*java*] [pagegate] ERROR [http-8080-Processor23] RequestProcessor.processMapping(676) | Invalid path was requested /scripts/dojo/src/widget/templates/ComboBox On 1/30/07, Michael Horwitz <[EMAIL PROTECTED]> wrote:
Matt, I have attached a simple filter class which works well with Spring MVC. The basic operation works on the following principles: 1) The servlet container retains responsibility for serving all static resources. This ensures optimum performance (resources can be cached, have their timestamps checked for updates, etc) and avoids any I/O nasties that might arise if the filter itself tries to read and serve up these resources. 2) The filter redirects any requests for active pages to the relevant processing chain, which includes all filters related to active content, e.g. Hibernate filter. This helps ensure that the minimum number of filters are applied to static content. 3) The filter requires reasonably sophisticated pattern matching abilities to sort active from static page requests. This implies the use of an excludes filter on top of the normal include filter provided by default as part of the servlet standard. The attached implementation is Spring MVC specific. Any request that the filter believes matches an active page are redirected to the dispatch servlet by name. All other requests are allowed to pass straight through for normal processing by the servlet container. The solution also relies on the use of the <dispatcher> filter configuration element available as of the servlet 2.4 spec to separate filtering on active page requests from those for static content, which leads me to believe the solution could be made to work for the other web frameworks. Let me know what you think. Mike. On 1/29/07, mraible <[EMAIL PROTECTED]> wrote: > > > Any update on this Mike? It looks like most folks would prefer to stick > with > *.html (as would I). > > http://appfuse.org/pages/viewpage.action?pageId=495 > > Thanks, > > Matt > > > Matt Raible-3 wrote: > > > > On 1/17/07, Michael Horwitz < [EMAIL PROTECTED]> wrote: > >> Matt, > >> > >> I have successfully used Dojo with SpringMVC while still keeping the > >> .html > >> extension by using a filter to redirect any non-dojo requests to the > >> Spring > >> servlet. This approach has two nice side effects: 1) the servlet > >> container > >> can use its default handling for all static content and 2) one can > reduce > >> the number of filters that get applied to such content. > >> > >> If people are interested I would be more than happy to share the > >> solution. > > > > I'd definitely be interested in this and having folks test it with > > Struts 2. It might be best to post it here, as well as in JIRA > > (http://issues.appfuse.org/browse/APF-431). > > > > Matt > > > >> > >> Mike. > >> > >> > >> On 1/17/07, Matt Raible < [EMAIL PROTECTED]> wrote: > >> > I've created a poll so everyone can vote on their favorite > extension. > >> > > >> > http://appfuse.org/pages/viewpage.action?pageId=495 > >> > > >> > You'll need to create an account and login to vote. To do this, go > to > >> > View > Account > Sign Up (or login if you already have an account). > > >> > > >> > Thanks! > >> > > >> > Matt > >> > > >> > On 1/16/07, Sanjiv Jivan <[EMAIL PROTECTED]> wrote: > >> > > I like .html but the problem I've faced with using this extension > is > >> that > >> > > serving static html file with the .html file extension (like > >> documentation, > >> > > Dojo templates or FckEditor files) becomes very hard to map to > not go > >> to > >> the > >> > > applications MVC controller. I've spent countless number of hours > >> messing > >> > > with the url-pattern in web.xml without much success. > >> > > > >> > > So I usually use .htm for the application extension. > >> > > > >> > > Sanjiv > >> > > > >> > > > >> > > On 9/20/06, Matt Raible < [EMAIL PROTECTED]> wrote: > >> > > > > >> > > > Dear AppFuse users, > >> > > > > >> > > > As many of you likely know, there are a couple of issues with > using > >> > > > the *.html extension with some frameworks in AppFuse. For > example, > >> > > > with WebWork - it loads Dojo template files from a *.html > >> extension. > >> > > > If you want to use Dojo with WebWork, you have to modify your > >> default > >> > > > extension. > >> > > > > >> > > > http://issues.appfuse.org/browse/APF-431 > >> > > > > >> > > > Because of this, we're starting to look at other > extensions. I'd > >> > > > rather use one for all frameworks, rather than the recommended > ones > >> > > > for each framework b/c it allows us to have one security.xmlfiles, > >> > > > rather than one for each framework. Another option is to use > >> > > > path-based mapping, for example: > >> > > > > >> > > > http://localhost:8080/yourapp/go/users > >> > > > > >> > > > Where "/go/*" is the path that front-controller servlet/filters > are > >> > > > mapped to. The only problem with this is stat trackers > typically > >> like > >> > > > to track extensions, and so we'd be unfriendly to those > companies > >> who > >> > > > like to watch their stats. > >> > > > > >> > > > Here's a couple thoughts - feel free to add your own > suggestions > >> and > >> > > thoughts: > >> > > > > >> > > > 1. *.htm > >> > > > 2. *.aspx > >> > > > 3. *.php > >> > > > 4. *.app > >> > > > 5. *.a > >> > > > 6. *.o > >> > > > 7. *.apf (would help us track AppFuse-based applications, but > it's > >> a > >> > > > pretty ugly extension) > >> > > > 8. *.em > >> > > > 9. *.fun > >> > > > 10. *.page > >> > > > > >> > > > I still like *.html the best b/c it doesn't give away the > >> underlying > >> > > > technology, so *.htm seems like the best option after > that. But of > >> > > > course, I'm open to suggestions. ;-) > >> > > > > >> > > > Matt > >> > > > > >> > > > > >> > > > >> --------------------------------------------------------------------- > > >> > > > 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] > >> > > >> > > >> > >> > > > > > > -- > > http://raibledesigns.com > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: http://www.nabble.com/Changing-default-extension-from-*.html-to-*.---tf2307780s2369.html#a8699069 > > Sent from the AppFuse - User mailing list archive at Nabble.com<http://nabble.com/> > . > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
