• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Sitemesh doesnt decorate any pages after action class is called

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I have a problem with sitemesh.
I have 2 pages, Login.jsp and Success.jsp
Heres my decorator.xml file

If I use this pattern, then both my Login.jsp and Success.jsp are decorated.
If I switch the pattern to this

Then only Login.jsp is decorated (as expected).
But If I change the pattern to

Then my Success.jsp page doesnt get decorated.
Success.jsp is called after Login.jsp subits its data to my action class. The action class loads the Success.jsp page.
It loads it without being decorated. The only thing I can think of is if sitemesh isnt working with my action classes,
but I havent read about anyone having this issue.
here is my struts.xml file

Does anyone know why it would ignore the jsp pages that are called up from an action class?
Please help me if you have any ideas whatsoever.

sincerely,
thebravedave
 
David Brave
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As an after note to my post above:

When my browser calls up Success.jsp (after authentication occurs), the browser shows the action in the url, not the Success.jsp page.

ie: http://localhost:8080/Authentication/login.action

vs: http://localhost:8080/Authentication/Success.jsp

So mabey sitemesh is not recognizing my actions page direction?

thebravedave
 
David Brave
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found my answer.

in my web.xml file, where you specify the filter mapping for sitemesh, you must declare when you want the dispatcher to use the sitemesh
framework. I didnt originally specify any <dispatcher>'s in my web.xml file, which meant that it was only picking up requests, not when
the action was setup to forward to a jsp page, like with my Success.jsp page.
i set my filter-mappings up as below to have sitemesh start working with my actions that forward.
hope this helps someone...thebravedave
 
get schwifty. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic