Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion problem exclude file with sitemesh3
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Shaunak Khedkar  
View profile  
 More options Jul 8 2011, 2:23 pm
From: Shaunak Khedkar <shaunakkhed...@gmail.com>
Date: Fri, 8 Jul 2011 11:23:36 -0700 (PDT)
Local: Fri, Jul 8 2011 2:23 pm
Subject: Re: problem exclude file with sitemesh3
Hi Stanilas,

Please have a look at the following:

Problem Resolved. Apply the decorator to all the pages by using:
<mapping path="/*" exclude="false" decorator="/decorator.jsp"/>

And to exculde a particular page from being decorated by the
decorator, add <%@ page contentType="application/json" %> to the page.
(I have used contentType="applicaion/json" because I need it. You can
put others as well but not "text/html")

This is because By default, SiteMesh will only intercept responses
that set the Content-Type HTTP header to text/html.

Please refer the following site,
http://www.sitemesh.org/configuration.html and see for this section:

Advanced Configuration:

For most users, the decorator mappings above should be enough. But if
you want more options...
MIME Types

By default, SiteMesh will only intercept responses that set the
Content-Type HTTP header to text/html.

This can be altered to allow SiteMesh to intercept responses for other
types. This is only applicable for the SiteMesh Filter - it is ignored
by the offline site builder.

Thanks!!

On Jul 7, 6:40 pm, "stani...@yahoo.fr" <stani...@yahoo.fr> wrote:

> hi sitemesh develloper
> i need some help
> i want to exclude one file but i dont sucess :/
> sitemesh working good all my file is decoratinf
> my sitemesh3.xml
> <sitemesh>

> <excludes> <pattern>/index.jsp</pattern></excludes>
>    <mapping path="/*" decorator="/decorator/decorator.jsp"></mapping>

> </sitemesh>

> my decorator.jsp model
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>     pageEncoding="ISO-8859-1"%>
>      <%@ taglib prefix="s" uri="/struts-tags" %>
>      <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
>      <%@ taglib prefix="menu" uri="http://struts-menu.sf.net/tag-el"%>

> <html>
>   <head>
>     <title>SiteMesh example: <sitemesh:write property='title'/></
> title>
>     <style type='text/css'>
>       /* Some CSS */
>       body { font-family: arial, sans-serif; background-color:
> #ffffcc;}
>       h1, h2, h3, h4 { text-align: center; background-color: #ccffcc;
> border-top: 1px solid #66ff66; }
>       .mainBody {height:"100%"; width:"80%" ; border: 1px solid
> #555555; }
>       .disclaimer { text-align: center; border-top: 1px solid #cccccc;
> margin-top: 40px; color: #666666; }
> .menu{float:left;witdh:"20%"; height:100%; margin-right:5% }
>     </style>
>     <sitemesh:write property='head' width="30%" height="100%"/>
>   </head>
>   <body>

>     <h1 class='title'>SiteMesh example site: <sitemesh:write
> property='title'/></h1>
> <div>
> <div id="menu" class="menu">
> <menu:useMenuDisplayer name="TabbedMenu"
>   bundle="Global" >
>   <menu:displayMenu name="Global.Home" />
>   <menu:displayMenu name="Global.About" />
> </menu:useMenuDisplayer>
> </div>
>     <div class='mainBody'>
>       <sitemesh:write property='body'/>
>     </div>
> </div>
>     <div class='disclaimer'>Site disclaimer. This is an example.</div>

>   </body>
> </html>

> my web.xml:

> <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/
> j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-ap...">

>     <display-name>examplestrust</display-name>

>     <filter>
>         <filter-name>struts2</filter-name>
>         <filter-
> class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter </
> filter-class>
>     </filter>

>     <filter-mapping>
>         <filter-name>struts2</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <listener>
>         <listener-class>net.sf.navigator.menu.MenuContextListener</
> listener-class>
>     </listener>

>   <filter>
>     <filter-name>sitemesh</filter-name>
>     <filter-class>org.sitemesh.config.ConfigurableSiteMeshFilter</
> filter-class>
>   </filter>

>   <filter-mapping>
>         <filter-name>sitemesh</filter-name>
>         <url-pattern>/*</url-pattern>
>         <dispatcher>REQUEST</dispatcher>
>         <dispatcher>FORWARD</dispatcher>
>         <dispatcher>INCLUDE</dispatcher>
>     </filter-mapping>

>  <welcome-file-list>
>         <welcome-file>/index/index.jsp</welcome-file>
>     </welcome-file-list>

> </web-app>
> somebodu help me please :(.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.