Apache Struts 2 Documentation > Home > Guides > Tag Developers Guide > Struts Tags > Tag Reference > Generic Tag Reference > include |

Apache Struts 2 Documentation
include
Edit Page Browse Space Add Page Add News
Added by digi9ten, last edited by Don Brown on Jan 06, 2007 (view change)

| Please make sure you have read the test:Tag Syntax document and understand how tag attribute syntax works.

## Description

Include a servlet's output (result of servlet or a JSP page).

Note: Any additional params supplied to the included page are not accessible within the rendered page through the <s:property...> tag!

## Parameters

#### Name | #### Required | #### Default | #### Evaluated | #### Type | #### Description
--- | --- | --- | --- | --- | ---
id | false |  | true | String | id for referencing element. For UI and form tags it will be used as HTML id attribute
value | true |  | true | String | The jsp/servlet output to include

## Example

    <-- One: -->
    <s:include value="myJsp.jsp" />

    <-- Two: -->
    <s:include value="myJsp.jsp">
       <s:param name="param1" value="value2" />
       <s:param name="param2" value="value2" />
    </s:include>

    <-- Three: -->
    <s:include value="myJsp.jsp">
       <s:param name="param1">value1</s:param>
       <s:param name="param2">value2<s:param>
    </s:include>

    Example one - do an include myJsp.jsp page
    Example two - do an include to myJsp.jsp page with parameters param1=value1 and param2=value2
    Example three - do an include to myJsp.jsp page with parameters param1=value1 and param2=value2