0

I have the following Tiles2 template:

<body>
   <div id="container" >
    <tiles:insertAttribute name="header" />
    <tiles:insertAttribute name="menu" /> 
    <div id="content">
        <tiles:insertAttribute name="myContent" />
    </div>
    <tiles:insertAttribute name="footer" />
  </div>
</body>

In the div "content", i'm trying to load an external page passing parameters to the URL, like this: http://www.myhost.com/forms/frmservlet?form=${param1}&width=${param2}

The action definition should be something like this:

    <action name="oraForms"  class="com.struts.actions.OracleFormsAction>
        <result name="success" type="tiles">oraForms</result>
    </action>

The definition of the tile, seems to:

<definition name="oraForms" extends="aplicacion_contexto">
    <put-attribute name="contenido" value=http://www.myhost.com/forms/frmservlet?form=${param1}&width=${param2}"/>
</definition>

How can i include the content of the url in the tile? (i dont want to use "iframe"). How can pass the parameters to the URL? (These are in the action)

Thanks you!!

perkas
  • 48
  • 6
  • 1
    I'm not sure that you can do that, since you're basically asking Tiles to make its own web request. You could make the request in the action and expose that to the view layer, but there are a *lot* of things that could go wrong with that since you're trying to embed an entire web page inside another, e.g., CSS and JS issues could wreak *havoc*. – Dave Newton Feb 19 '15 at 17:37

1 Answers1

2

I solve myself. The tile links to a jsp with this:

<c:import url="${urlForm}" />

This read the external page, and render in my jsp..

Thank you Dave!!

perkas
  • 48
  • 6