You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pavel Sapozhnikov <pa...@gmail.com> on 2007/08/22 21:08:34 UTC

Struts2 Tiles question

Hi everybody. I have a question. I included all necessary things in order to
take advantage of tiles in Struts2. I included listened in web.xml I
included result type in struts.xml so now I know that I need
tiles-config.xml in my WEB-INF right. Well how does tile-config.xml look
like. Could anyone give an example please thank you.

-- 
Pavel Sapozhnikov
xFact, Inc
pavel@xfact.com

Re: Struts2 Tiles question

Posted by Chris Pratt <th...@gmail.com>.
> And then import the jsp right? So how would I tell the tile jsp to use a
> certain definition?

The normal way to integrate the two is to use the type="tiles" result
type, and have your result reference a definition that points to the
layout that it needs.

It's also possible to point to a .jsp page that internally contains
it's definition so there would never be a need to point to an external
definition.

Is there a reason you don't want to go down the road most traveled?
  (*Chris*)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 Tiles question

Posted by Pavel Sapozhnikov <pa...@gmail.com>.
And then import the jsp right? So how would I tell the tile jsp to use a
certain definition?

On 8/23/07, Chris Pratt <th...@gmail.com> wrote:
>
> > Can I instead of pointing to a definition point to actual jsp? And this
> jsp
> will have like more tile:insertAttribute and yea? Could I do that?
>
> >Great and how do I tell the tile jsp to use the specified definition?
> Also
> definitions can only be in tiles.xml right?
>
>
> You can put the definition right in the jsp using the <tiles:definition>
> tag.
>   (*Chris*)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Pavel Sapozhnikov
xFact, Inc
pavel@xfact.com

Re: Struts2 Tiles question

Posted by Chris Pratt <th...@gmail.com>.
> Can I instead of pointing to a definition point to actual jsp? And this jsp
will have like more tile:insertAttribute and yea? Could I do that?

>Great and how do I tell the tile jsp to use the specified definition? Also
definitions can only be in tiles.xml right?


You can put the definition right in the jsp using the <tiles:definition> tag.
  (*Chris*)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 Tiles question

Posted by Pavel Sapozhnikov <pa...@gmail.com>.
Sorry tell* haha

On 8/23/07, Pavel Sapozhnikov <pa...@gmail.com> wrote:
>
> Great and how do I tile the tile jsp to use the specified definition? Also
> definitions can only be in tiles.xml right?
>
> On 8/23/07, Chris Pratt < thechrispratt@gmail.com> wrote:
> >
> > Yes, but then you wouldn't use type="tiles"
> >   (*Chris*)
> >
> > On 8/23/07, Pavel Sapozhnikov <pa...@gmail.com> wrote:
> > > Yeah I think thats what I was looking for, um but actually I was
> > wondering
> > > in struts.xml I say:
> > >
> > > <action name="presentEntryLogin" class="
> > > com.xfact.struts2login.actions.LoginLogoutDispatchAction"
> > > method="presentEntryLogin">
> > >             <result name="input" type="tiles">swiss.not_authenticated
> > > </result>
> > >         </action>
> > >
> > > Can I instead of pointing to a definition point to actual jsp? And
> > this jsp
> > > will have like more tile:insertAttribute and yea? Could I do that?
> > >
> > > On 8/23/07, Jiang, Jane (NIH/NCI) [C] <ji...@mail.nih.gov> wrote:
> > > >
> > > > I don't think you need tile-config.xml.  You can just add your tiles
> > > > definition to tiles.xml in WEB-INF.
> > > >
> > > > -----Original Message-----
> > > > From: Pavel Sapozhnikov [mailto: pavel.sapozhnikov@gmail.com]
> > > > Sent: Wednesday, August 22, 2007 3:09 PM
> > > > To: user@struts.apache.org
> > > > Subject: Struts2 Tiles question
> > > >
> > > > Hi everybody. I have a question. I included all necessary things in
> > > > order to
> > > > take advantage of tiles in Struts2. I included listened in web.xml I
> > > > included result type in struts.xml so now I know that I need
> > > > tiles-config.xml in my WEB-INF right. Well how does tile-config.xmllook
> > > > like. Could anyone give an example please thank you.
> > > >
> > > > --
> > > > Pavel Sapozhnikov
> > > > xFact, Inc
> > > > pavel@xfact.com
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Pavel Sapozhnikov
> > > xFact, Inc
> > > pavel@xfact.com
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> Pavel Sapozhnikov
> xFact, Inc
> pavel@xfact.com
>



-- 
Pavel Sapozhnikov
xFact, Inc
pavel@xfact.com

Re: Struts2 Tiles question

Posted by Pavel Sapozhnikov <pa...@gmail.com>.
Great and how do I tile the tile jsp to use the specified definition? Also
definitions can only be in tiles.xml right?

On 8/23/07, Chris Pratt <th...@gmail.com> wrote:
>
> Yes, but then you wouldn't use type="tiles"
>   (*Chris*)
>
> On 8/23/07, Pavel Sapozhnikov <pa...@gmail.com> wrote:
> > Yeah I think thats what I was looking for, um but actually I was
> wondering
> > in struts.xml I say:
> >
> > <action name="presentEntryLogin" class="
> > com.xfact.struts2login.actions.LoginLogoutDispatchAction"
> > method="presentEntryLogin">
> >             <result name="input" type="tiles">swiss.not_authenticated
> > </result>
> >         </action>
> >
> > Can I instead of pointing to a definition point to actual jsp? And this
> jsp
> > will have like more tile:insertAttribute and yea? Could I do that?
> >
> > On 8/23/07, Jiang, Jane (NIH/NCI) [C] <ji...@mail.nih.gov> wrote:
> > >
> > > I don't think you need tile-config.xml.  You can just add your tiles
> > > definition to tiles.xml in WEB-INF.
> > >
> > > -----Original Message-----
> > > From: Pavel Sapozhnikov [mailto:pavel.sapozhnikov@gmail.com]
> > > Sent: Wednesday, August 22, 2007 3:09 PM
> > > To: user@struts.apache.org
> > > Subject: Struts2 Tiles question
> > >
> > > Hi everybody. I have a question. I included all necessary things in
> > > order to
> > > take advantage of tiles in Struts2. I included listened in web.xml I
> > > included result type in struts.xml so now I know that I need
> > > tiles-config.xml in my WEB-INF right. Well how does tile-config.xmllook
> > > like. Could anyone give an example please thank you.
> > >
> > > --
> > > Pavel Sapozhnikov
> > > xFact, Inc
> > > pavel@xfact.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > Pavel Sapozhnikov
> > xFact, Inc
> > pavel@xfact.com
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Pavel Sapozhnikov
xFact, Inc
pavel@xfact.com

Re: Struts2 Tiles question

Posted by Chris Pratt <th...@gmail.com>.
Yes, but then you wouldn't use type="tiles"
  (*Chris*)

On 8/23/07, Pavel Sapozhnikov <pa...@gmail.com> wrote:
> Yeah I think thats what I was looking for, um but actually I was wondering
> in struts.xml I say:
>
> <action name="presentEntryLogin" class="
> com.xfact.struts2login.actions.LoginLogoutDispatchAction"
> method="presentEntryLogin">
>             <result name="input" type="tiles">swiss.not_authenticated
> </result>
>         </action>
>
> Can I instead of pointing to a definition point to actual jsp? And this jsp
> will have like more tile:insertAttribute and yea? Could I do that?
>
> On 8/23/07, Jiang, Jane (NIH/NCI) [C] <ji...@mail.nih.gov> wrote:
> >
> > I don't think you need tile-config.xml.  You can just add your tiles
> > definition to tiles.xml in WEB-INF.
> >
> > -----Original Message-----
> > From: Pavel Sapozhnikov [mailto:pavel.sapozhnikov@gmail.com]
> > Sent: Wednesday, August 22, 2007 3:09 PM
> > To: user@struts.apache.org
> > Subject: Struts2 Tiles question
> >
> > Hi everybody. I have a question. I included all necessary things in
> > order to
> > take advantage of tiles in Struts2. I included listened in web.xml I
> > included result type in struts.xml so now I know that I need
> > tiles-config.xml in my WEB-INF right. Well how does tile-config.xml look
> > like. Could anyone give an example please thank you.
> >
> > --
> > Pavel Sapozhnikov
> > xFact, Inc
> > pavel@xfact.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> Pavel Sapozhnikov
> xFact, Inc
> pavel@xfact.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 Tiles question

Posted by Pavel Sapozhnikov <pa...@gmail.com>.
Yeah I think thats what I was looking for, um but actually I was wondering
in struts.xml I say:

<action name="presentEntryLogin" class="
com.xfact.struts2login.actions.LoginLogoutDispatchAction"
method="presentEntryLogin">
            <result name="input" type="tiles">swiss.not_authenticated
</result>
        </action>

Can I instead of pointing to a definition point to actual jsp? And this jsp
will have like more tile:insertAttribute and yea? Could I do that?

On 8/23/07, Jiang, Jane (NIH/NCI) [C] <ji...@mail.nih.gov> wrote:
>
> I don't think you need tile-config.xml.  You can just add your tiles
> definition to tiles.xml in WEB-INF.
>
> -----Original Message-----
> From: Pavel Sapozhnikov [mailto:pavel.sapozhnikov@gmail.com]
> Sent: Wednesday, August 22, 2007 3:09 PM
> To: user@struts.apache.org
> Subject: Struts2 Tiles question
>
> Hi everybody. I have a question. I included all necessary things in
> order to
> take advantage of tiles in Struts2. I included listened in web.xml I
> included result type in struts.xml so now I know that I need
> tiles-config.xml in my WEB-INF right. Well how does tile-config.xml look
> like. Could anyone give an example please thank you.
>
> --
> Pavel Sapozhnikov
> xFact, Inc
> pavel@xfact.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Pavel Sapozhnikov
xFact, Inc
pavel@xfact.com

RE: Struts2 Tiles question

Posted by "Jiang, Jane (NIH/NCI) [C]" <ji...@mail.nih.gov>.
I don't think you need tile-config.xml.  You can just add your tiles
definition to tiles.xml in WEB-INF.

-----Original Message-----
From: Pavel Sapozhnikov [mailto:pavel.sapozhnikov@gmail.com] 
Sent: Wednesday, August 22, 2007 3:09 PM
To: user@struts.apache.org
Subject: Struts2 Tiles question

Hi everybody. I have a question. I included all necessary things in
order to
take advantage of tiles in Struts2. I included listened in web.xml I
included result type in struts.xml so now I know that I need
tiles-config.xml in my WEB-INF right. Well how does tile-config.xml look
like. Could anyone give an example please thank you.

-- 
Pavel Sapozhnikov
xFact, Inc
pavel@xfact.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts2 Tiles question

Posted by "Dinwiddie, George" <ge...@issproxy.com>.
Is
http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main
/webapp/WEB-INF/tiles.xml?view=markup (http://tinyurl.com/2p4adw) what
you're looking for?

 George Dinwiddie, iDIA Computing, LLC
 http://iDIAcomputing.com/
 http://blog.gdinwiddie.com/
 

-----Original Message-----
From: Pavel Sapozhnikov [mailto:pavel.sapozhnikov@gmail.com] 
Sent: Wednesday, August 22, 2007 3:09 PM
To: user@struts.apache.org
Subject: Struts2 Tiles question

Hi everybody. I have a question. I included all necessary things in
order to
take advantage of tiles in Struts2. I included listened in web.xml I
included result type in struts.xml so now I know that I need
tiles-config.xml in my WEB-INF right. Well how does tile-config.xml look
like. Could anyone give an example please thank you.

-- 
Pavel Sapozhnikov
xFact, Inc
pavel@xfact.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org