A: 

Did you try doing /spring/cliente/index* or /spring/cliente/index/*?

ballmw
yes i try that, but it doesn't work
atomsfat
In looking at my decorators.xml I see that I used */ at the beginning.Can you try */spring/client/index* or */spring/cliente/index/*
ballmw
What app server are you using. Because this actually works different in OAS.
ballmw
A: 

I've had that exact problem. What's happening is that any part of the url path you specify in the web.xml gets stripped out by the web server before it gets passed to Spring, but only if you put the wildcard at the end. You have already discovered that when your url is www.myapp.com/spring/cliente/index.html, if you put this in your web.xml

<servlet-mapping>
   <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
   <url-pattern>/spring/*</url-pattern>
</servlet-mapping>

Spring will only see the part of the request path after the /spring. In that case you need to specify your RequestMapping as "/cliente/index.html".

You can also specify your servlet mapping this way.

<servlet-mapping>
   <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
   <url-pattern>*.html</url-pattern>
</servlet-mapping>

Then Spring will see the entire request path and you can specify your request mappings like this "/spring/cliente/index.html". The same goes for Sitemesh. It only sees what the web server passes through.

GMK
+1  A: 

The problem is that SiteMesh uses Request.getServletPath() which in your spring mvc application will return "/spring" for everything. I found this by implementing the com.opensymphony.module.sitemesh.DecoratorMapper interface and using it in place of the normal ConfigDecoratorMapper. Then I was able to inspect the various arguments used to map decorators to requests. Unfortunately, I think this leaves you with the only option being to use the *.html suffix in the DispatcherServelet mapping or some variant thereof.

Another option would be to configure a PageDecoratorMapper and use this tag in your original undecorated page to specify which layout to use:

 <meta name="decorator" content="layoutName" /> 

Although then you void the benefits of url mappings.

fargraph