Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Stripes URL binding  RSS feed

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


this does not work when i type http://......./app/frontend/show, though if i do http://...../app/frontend/show.action, it's ok. What the problem? Should i change something i web.xml?
 
Rancher
Posts: 43009
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most common setup for the StripesDispatcher servlet is to be mapped to *.action URLs. If you want it to be mapped to something else as well, then -yes- you'll need to add that to web.xml.
 
Vadim Vararu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://greggbolinger.blogspot.com/2008/01/stripes-15-feature-clean-urls.html

Interesting, but i couldn't find anything on web.xml in this article....
I guess we have to declare in web.xml dynamicMappingFilter, but i couldn't find it anywhere in internet....
 
Ulf Dittmer
Rancher
Posts: 43009
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it doesn't talk about web.xml, but note that all URLBindings start with "/action/...", while the actual URLs are something like "http://.../app/action/...". So I bet that StripesDispatcher is mapped to "/action/*". After all, if an incoming request isn't mapped to a servlet, then there's nothing the servlet can do about it.
 
Vadim Vararu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't bet, cause you can lose

It does not work. I'm not 100% sure, but that's how i got it to work. When we wanna use binding, we have to replace dispatcher servlet with dynamicMappingFIlter. At least this worken for me. I couldn't obtain result with something like /* in dispatcher servlet.
 
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Vadim Vararu wrote:Don't bet, cause you can lose

It does not work. I'm not 100% sure, but that's how i got it to work. When we wanna use binding, we have to replace dispatcher servlet with dynamicMappingFIlter. At least this worken for me. I couldn't obtain result with something like /* in dispatcher servlet.



Yep, all that makes sense. Servlets won't work without a url pattern and they won't work right with /*. That is why DynamicMappingFilter was created. Unless you need to do something special with DispatcherServlet, there is no need to define it if you use DMF (DMF creates a DispatcherServlet for you). I use DMF exclusively now and have no problems. There are also lots of UrlBinding enhancements in Stripes 1.5.1 which was recently released.

To be clear, DispatcherServlet requires something like /action/* or *.action or /bla/*, etc. DMF does not and works without special prefixes or suffixes, just as clean URL's should.
 
mooooooo ..... tiny ad ....
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!