This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Stripes framework, unable to use multiple layout components

 
Ranch Hand
Posts: 228
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on a pretty basic stripes application in my free time to help study up. I'm armed with the pragmatic programmers book and the online documentation, but I'm struggling on a simple issue regarding the reusable layouts.

I have a layout, I'm having a problem with the following lines



It seems that in order for my page to display without any errors, I have to comment one of those parts out. I can have either the header or the menu, just not at the same time. If I try to use them at the same time I get errors such as :



Here are some of my code extracts to help explain whats going

/jsp/common/default.jsp - My layout definition





/jsp/common/_header.jsp - I'll use this for the header such as banners/logo etc




/jsp/common/_menu.jsp - this page will have the side-bar type menu




/jsp/dashboard.jsp - a page that provides the body content and is to use
the layout definition




Does the problem lie between the keyboard and chair or have I genuinely encountered an issue with stripes?

Many thanks

 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like a mutually recursive layout definition to me: default includes header, and header includes default.
 
James Elsey
Ranch Hand
Posts: 228
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf, thanks for the reply.

If there was to be an endless loop going on between default and header, then it should not work if I comment out the default/menu part, and vice versa

What I've done for the mean time is to strip out the stripes layout on the menu and header, and just have them as jsp includes. Not really an ideal usage of the tools at hand, but a viable workaround until I find a proper solution



Thanks

 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!