Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6065209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:21:54+00:00 2026-05-23T09:21:54+00:00

I am experiencing some problems with the stripes layout. I will give a test

  • 0

I am experiencing some problems with the stripes layout. I will give a test case here:

Main Layout(main.jsp):

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@include file="/WEB-INF/jsp/common/taglibs.jsp" %>

<s:layout-definition>    

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>{$title}</title>
</head>
<body>
    <s:layout-component name="body"/>
</body>
</html>

</s:layout-definition>

Sub Layout which is extending the main(sub_main.jsp):

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@include file="/WEB-INF/jsp/common/taglibs.jsp" %>

<s:layout-definition>
    <s:layout-render name="/WEB-INF/jsp/common/main.jsp" title="${title}">
        <s:layout-component name="body">
            This is a test and this is from sub main
            <div style="color: red; font-size: 5em;">
                <s:layout-component name="subheader"/>
            </div>
            ${body}     
        </s:layout-component>
    </s:layout-render>
</s:layout-definition>    

Now I am using the sub-main layout in the following code(test.jsp):

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@include file="/WEB-INF/jsp/common/taglibs.jsp" %>

<s:layout-render name="/WEB-INF/jsp/common/sub_main.jsp" title="Test Page">
    <s:layout-component name="subheader">
        This is from the sub header component
    </s:layout-component>
    <s:layout-component name="body">
        This is from body
    </s:layout-component>
</s:layout-render>

But in browser I am seeing the following:

This is a test and this is from sub main
This is from body

Instead of:

This is a test and this is from sub main
This is from the sub header component
This is from body

Above all the title is displayed as:

“$title”.

Please any body can give me a clue about what I am doing wrong ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:21:54+00:00Added an answer on May 23, 2026 at 9:21 am

    I noticed that subheader is defined within the body component of the sub_main.jsp defenition, I don’t think you can nest the component tags like that. You might want to try using a EL expression for the subheader instead (use: ${subheader}).

    It’s maybe best to always use EL expressions instead of layout-component tags when rendering the contents of a layout-component and only use layout-components for defining the layout. You can’t use layout-components for rendering while nested in a layout-definition (this dual usage of the layout-component is a design fault of the library and leads to unnecessary confusion in my opinion).

    See also the Nested Layouts section of the official Stripes documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm experiencing some problems with breaking my code to reusable parts using templates and
I'm debugging a service that's experiencing some problems on start-up. To aid me in
I am experiencing some performance problems when creating a very simple Python HTTP server.
I'm experiencing some strange behavior for which I can't find any documented knowledge. Here's
I am experiencing some problems with a google chrome extension I have made. I've
Okay i'm new to asp mvc2 and i'm experiencing some problems with the htmlhelper
I am experiencing some strange problems with NHibernate and the usage of proxy items
After experiencing some performances issues on my client side, we decided to give a
I'm developping an application with CakePHP and I'm experiencing some problems with my DB.
I'm experiencing some weird problems with SESSION variables on my PHP/Ajax online shopping cart.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.