[appfuse-user] Decorators

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[appfuse-user] Decorators

SONI, Ketan, GBM

Hi ,

 

I want to use different decorators depending on the path of the URL being accessed.  If the URL is under the WEB-INF directory I am finding that the default decorator is used ie. One that includes the header, footer and menu etc... instead of the one that I have setup in the decorators file

 

The following is the decorator.xml file I am using

 

<decorators defaultdir="/decorators">

    <excludes>

        <pattern>/demos/*</pattern>

        <pattern>/resources/*</pattern>

    </excludes>

     <decorator name="reports" page="report.jsp">

          <pattern>/*/report_output/*</pattern>   ( I have also tried /WEB-INF/pages/report_output/* but no luck)

     </decorator>

 

    <decorator name="default" page="default.jsp">

        <pattern>/*</pattern>

    </decorator>  

</decorators>

 

The struts config is as follows :

 

    <action path="/aReport" type="ActionClass"

      name="reportForm"

      scope="request"

      input="aReport"

      unknown="false"

       parameter="method"

      validate="false"

     >        

      <forward

        name="report_result"

        path="/WEB-INF/pages/report_output/displayReport.jsp"  (This is the page that I would like decorated differently)

        redirect="false"

      />

       <forward

          name="request_screen"

        path="/WEB-INF/pages/aReport.jsp" (This page is to be decorated as normal with menus etc...)

        redirect="false"

      />                            

 

Does anyone know how to get multiple decorators working for different URI paths that exist under the WEB-INF dir.  I realise that the content WEB-INF is restricted access and would like to know how to get around the problem.  It appears that Struts does not change the url for action forwards which causes the problem with Sitemesh decoration.  I have tried using redirect=true but this clears the request objects which are needed for the page that needs to be displayed.

 

I have tried using upgrading to Tomcat 5.0.28 to take advantage of the 2.4 container functionality with regard to redirects.  I have uncommented the lines in the web.xml for redirects and I still can not stop menus from appearing in the report output.

 

Any suggestions would be helpful. 

 

Many Thanks

 

Ketan

 



***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority

This e-mail message is confidential and for use by the
addressee only. If the message is received by anyone other
than the addressee, please return the message to the sender
by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The
Royal Bank of Scotland plc does not accept responsibility for
changes made to this message after it was sent.

Whilst all reasonable care has been taken to avoid the
transmission of viruses, it is the responsibility of the recipient to
ensure that the onward transmission, opening or use of this
message and any attachments will not adversely affect its
systems or data. No responsibility is accepted by The Royal
Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.
Visit our websites at:
http://www.rbs.co.uk/CBFM
http://www.rbsmarkets.com
********************************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [appfuse-user] Decorators

Matt Raible-3
You might try:

/*/report_output*

On 7/27/05, SONI, Ketan, FM <[hidden email]> wrote:

>  
>  
>
> Hi ,
>
>  
>
> I want to use different decorators depending on the path of the URL being
> accessed.  If the URL is under the WEB-INF directory I am finding that the
> default decorator is used ie. One that includes the header, footer and menu
> etc... instead of the one that I have setup in the decorators file
>
>  
>
> The following is the decorator.xml file I am using
>
>  
>
> <decorators defaultdir="/decorators">
>
>     <excludes>
>
>         <pattern>/demos/*</pattern>
>
>         <pattern>/resources/*</pattern>
>
>     </excludes>
>
>      <decorator name="reports" page="report.jsp">
>
>           <pattern>/*/report_output/*</pattern>   ( I have also tried
> /WEB-INF/pages/report_output/* but no luck)
>
>      </decorator>
>
>  
>
>     <decorator name="default" page="default.jsp">
>
>         <pattern>/*</pattern>
>
>     </decorator>  
>
> </decorators>
>
>  
>
> The struts config is as follows :
>
>  
>
>     <action path="/aReport" type="ActionClass"
>
>       name="reportForm"
>
>       scope="request"
>
>       input="aReport"
>
>       unknown="false"
>
>        parameter="method"
>
>       validate="false"
>
>      >        
>
>       <forward
>
>         name="report_result"
>
>        
> path="/WEB-INF/pages/report_output/displayReport.jsp"
> (This is the page that I would like decorated differently)
>
>         redirect="false"
>
>       />
>
>        <forward
>
>           name="request_screen"
>
>         path="/WEB-INF/pages/aReport.jsp" (This page is to be decorated as
> normal with menus etc...)
>
>         redirect="false"
>
>       />                            
>
>  
>
> Does anyone know how to get multiple decorators working for different URI
> paths that exist under the WEB-INF dir.  I realise that the content WEB-INF
> is restricted access and would like to know how to get around the problem.
> It appears that Struts does not change the url for action forwards which
> causes the problem with Sitemesh decoration.  I have tried using
> redirect=true but this clears the request objects which are needed for the
> page that needs to be displayed.
>
>  
>
> I have tried using upgrading to Tomcat 5.0.28 to take advantage of the 2.4
> container functionality with regard to redirects.  I have uncommented the
> lines in the web.xml for redirects and I still can not stop menus from
> appearing in the report output.
>
>  
>
> Any suggestions would be helpful.  
>
>  
>
> Many Thanks
>
>  
>
> Ketan
>
>  
>  
> ***********************************************************************************
>  The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered
> Office: 36 St Andrew Square, Edinburgh EH2 2YB.
>  Authorised and regulated by the Financial Services Authority
>  
>  This e-mail message is confidential and for use by the
>  addressee only. If the message is received by anyone other
>  than the addressee, please return the message to the sender
>  by replying to it and then delete the message from your
>  computer. Internet e-mails are not necessarily secure. The
>  Royal Bank of Scotland plc does not accept responsibility for
>  changes made to this message after it was sent.
>  
>  Whilst all reasonable care has been taken to avoid the
>  transmission of viruses, it is the responsibility of the recipient to
>  ensure that the onward transmission, opening or use of this
>  message and any attachments will not adversely affect its
>  systems or data. No responsibility is accepted by The Royal
>  Bank of Scotland plc in this regard and the recipient should carry
>  out such virus and other checks as it considers appropriate.
>  Visit our websites at:
>  http://www.rbs.co.uk/CBFM 
>  http://www.rbsmarkets.com 
> ********************************************************************************
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...