Are you using Netbeans, Eclipse WTP or any other IDE for development? 2010/10/4 Oddbjørn Sjøgren <bj...@yaymicro.com>: > I'm so sorry, I was looking (and editing) the wrong xml file. I guess there > can actually be two web.xml files? I have one in > tomcat/apache-tomcat-6.0.16/conf/web.xml > and one (more local) in > tomcat/apache-tomcat-6.0.16/webapps/ROOT/WEB-INF/web.xml > Since changing the first one had effect on my website I assumed I had found > the right one, but they are both used I guess? > This was what confused me, and I got it working now. Thank you so much, and > so sorry for this silly mistake. > Bjorn > 2010/10/4 VANKEISBELCK Remi <r...@rvkb.com> >> >> Huh..? I can't see how Stripes would work without dispatcher servlet >> mapping or at least DMF... It ain't Stripes related btw, that's just how >> servlets work, with URL mappings... >> >> You can post your web.xml here if it's ok for you ? >> >> Cheers >> >> Remi >> >> 2010/10/4 Oddbjørn Sjøgren <bj...@yaymicro.com> >>> >>> >>> 2010/10/4 VANKEISBELCK Remi <r...@rvkb.com> >>>> >>>> Yes it's all in web.xml. >>>> >>>> You certainly already have defined a mapping for the dispatcher servlet >>>> ? >>> >>> No, thats the thing, in my web.xml there is only a servlet like this. No >>> refference to a stripes DispatcherServlet. >>> <servlet> >>> <servlet-name>default</servlet-name> >>> >>> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> >>> <init-param> >>> <param-name>debug</param-name> >>> <param-value>0</param-value> >>> </init-param> >>> <init-param> >>> <param-name>listings</param-name> >>> <param-value>false</param-value> >>> </init-param> >>> <load-on-startup>1</load-on-startup> >>> </servlet> >>> Then there is the mapping that I mentioned in the initial post. >>> >>> Nothing >>>> >>>> The way to map your actions in the web.xml goes like this : >>>> >>>> <servlet> >>>> <servlet-name>StripesDispatcher</servlet-name> >>>> >>>> <servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class> >>>> <load-on-startup>1</load-on-startup> >>>> </servlet> >>>> >>>> <servlet-mapping> >>>> <servlet-name>StripesDispatcher</servlet-name> >>>> <url-pattern>/dispatcher</url-pattern> >>>> </servlet-mapping> >>>> >>>> <!-- all in action folder --> >>>> <servlet-mapping> >>>> <servlet-name>StripesDispatcher</servlet-name> >>>> <url-pattern>/action/*</url-pattern> >>>> </servlet-mapping> >>>> >>>> <!-- all .action suffixes --> >>>> <servlet-mapping> >>>> <servlet-name>StripesDispatcher</servlet-name> >>>> <url-pattern>*.action</url-pattern> >>>> </servlet-mapping> >>>> >>>> <!-- action with @UrlBinding("/view/{foo}/{bar}") --> >>>> <servlet-mapping> >>>> <servlet-name>StripesDispatcher</servlet-name> >>>> <url-pattern>/view/*</url-pattern> >>>> </servlet-mapping> >>>> >>>> HTH >>>> >>>> Cheers >>>> >>>> Remi >>> >>> I tried deleting the servlet that I had and replacing it with your >>> suggestion, then I couldn't get any pages anymore. *scratch head* >>>> >>>> 2010/10/4 Oddbjørn Sjøgren <bj...@yaymicro.com> >>>>> >>>>> >>>>> On Mon, Oct 4, 2010 at 11:33 AM, VANKEISBELCK Remi <r...@rvkb.com> >>>>> wrote: >>>>>> >>>>>> Hi >>>>>> >>>>>> I think you have an url mapping issue : I guess Stripes dispatcher is >>>>>> mapped on "*.action", so : >>>>>> >>>>>> http://.../myapp/search.action?searchString=foo...-> OK >>>>>> http://.../myapp/search?searchString=foo -> Error >>>>> >>>>> That's right. *.action is the default mapping when I have not >>>>> explicitly set one right? >>>>>> >>>>>> Otherwise the clean URLs should work by default, so : >>>>>> http://.../myapp/search.action/foo -> OK >>>>>> >>>>>> If you want to do it like this : >>>>>> http://.../myapp/search/foo >>>>>> >>>>>> Then you have two options : >>>>>> * define a mapping for dispatcher servlet on all your beans (as you >>>>>> don't have the *.action suffix) >>>>>> * use Dynamic Mapping Filter >>>>> >>>>> Yes, I've pretty much understood that, but I just don't understand how >>>>> to go about and do that.. Is it only a matter of changing the web.xml >>>>> file? >>>>> Could someone give me a short example on what I do? >>>>> >>>>>> >>>>>> HTH >>>>>> >>>>>> Cheers >>>>>> >>>>>> Remi >>>>>> >>>>>> 2010/10/3 Oddbjørn Sjøgren <bj...@yaymicro.com> >>>>>>> >>>>>>> Hi >>>>>>> >>>>>>> I'm trying to implement clean URLs in a project, but I can't get to >>>>>>> work. Right now the web.xml file has theese mappings: >>>>>>> >>>>>>> <servlet-mapping> >>>>>>> >>>>>>> <servlet-name>default</servlet-name> >>>>>>> >>>>>>> <url-pattern>/</url-pattern> >>>>>>> >>>>>>> </servlet-mapping> >>>>>>> >>>>>>> <servlet-mapping> >>>>>>> >>>>>>> <servlet-name>jsp</servlet-name> >>>>>>> >>>>>>> <url-pattern>*.jsp</url-pattern> >>>>>>> >>>>>>> </servlet-mapping> >>>>>>> >>>>>>> <servlet-mapping> >>>>>>> >>>>>>> <servlet-name>jsp</servlet-name> >>>>>>> >>>>>>> <url-pattern>*.jspx</url-pattern> >>>>>>> >>>>>>> </servlet-mapping> >>>>>>> >>>>>>> My ActionBeans all have a URL binding like >>>>>>> UrlBinding("/search.action") on them, and the >>>>>>> link http://domain.com/search.action?searchString=foo obviously >>>>>>> searches for >>>>>>> "foo". Now here is what I want: >>>>>>> >>>>>>> - All urls should work as they are now (I don't want a lot of dead >>>>>>> links) >>>>>>> >>>>>>> - In addition I want to introduce urls that look >>>>>>> like http://domain.com/search/foo >>>>>>> >>>>>>> Basically my question is how to achieve this. So far I've only tried >>>>>>> to change the the binding in the ActionBean to >>>>>>> @UrlBinding("/search/{searchString}") but that only leads to 404 >>>>>>> errors. I >>>>>>> guess there is something I need to do in the web.xml file, but I just >>>>>>> can't >>>>>>> understand what to do. I also understand that there is some way to >>>>>>> override >>>>>>> >>>>>>> NameBasedActionResolver, but I'm not sure how to do this? Can I just >>>>>>> write a new class that extends it and override it's methods? Will this >>>>>>> class >>>>>>> magically be used instead, or do I have to tell Stripes to use it >>>>>>> somehow? >>>>>>> >>>>>>> I'm running stripes 1.5.3 and java 1.6.0 on Linux >>>>>>> >>>>>>> Any help is greatly appreciated. >>>>>>> >>>>>>> Regards, >>>>>>> >>>>>>> Bjorn >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Virtualization is moving to the mainstream and overtaking >>>>>>> non-virtualized >>>>>>> environment for deploying applications. Does it make network security >>>>>>> easier or more difficult to achieve? Read this whitepaper to separate >>>>>>> the >>>>>>> two and get a better understanding. >>>>>>> http://p.sf.net/sfu/hp-phase2-d2d >>>>>>> _______________________________________________ >>>>>>> Stripes-users mailing list >>>>>>> Stripes-users@lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Virtualization is moving to the mainstream and overtaking >>>>>> non-virtualized >>>>>> environment for deploying applications. Does it make network security >>>>>> easier or more difficult to achieve? Read this whitepaper to separate >>>>>> the >>>>>> two and get a better understanding. >>>>>> http://p.sf.net/sfu/hp-phase2-d2d >>>>>> _______________________________________________ >>>>>> Stripes-users mailing list >>>>>> Stripes-users@lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users >>>>>> >>>>> >>>> >>> >> > > > ------------------------------------------------------------------------------ > Virtualization is moving to the mainstream and overtaking non-virtualized > environment for deploying applications. Does it make network security > easier or more difficult to achieve? Read this whitepaper to separate the > two and get a better understanding. > http://p.sf.net/sfu/hp-phase2-d2d > _______________________________________________ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > >
-- Richard Hauswald Blog: http://tnfstacc.blogspot.com/ LinkedIn: http://www.linkedin.com/in/richardhauswald Xing: http://www.xing.com/profile/Richard_Hauswald ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users