• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring MVC redirect with sitemesh

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings all,

I am using spring mvc 3 + sitemesh and spring security 3. i need to do the following scenario. i am using 2 different layouts for the 'bypassing users'and normal users. the approach i followed was working fine until i came across with some JavaScript popups because i noticed that the page was loading twice and poping up the same window twice. please validate my approach.

Controller class-


}
site mesh decorator xml -


here are my observations - if i use return "redirect:user.html"; & return "forward:user.html"; it was working fine with the correct layout (layout.jsp) for users, since decorator will catch it by pattern <pattern>/user*</pattern>. but the problem is form will load twice and i get the popup twice.

if i use return "forward:user.html"; or return "/user/user"; popup will come only once but the layout is wrong.cause should be that it will not captured from the decorator for url pattern <pattern>/user*</pattern> and it will use the default layout which is wrong (default.jsp).

I think there is something to handle from the spring side and not from the sitemesh. can you please give some guidance among this? is there any specific way to handle this kind of scenario?Thank you in advance.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic