AW: Tiles

2005-07-11 Thread Leon Rosenberg
Use logic tags, they do tie tags to the jsp context. In jstl you'd have to
write something like:
tiles:insert name=${question} flush=false /  

 -Ursprüngliche Nachricht-
 Von: Dewitte Rémi [mailto:[EMAIL PROTECTED] 
 Gesendet: Montag, 11. Juli 2005 15:49
 An: Struts Users Mailing List
 Betreff: Re: Tiles
 
 Going on...
 tiles:useAttribute id=listQuestions name=listQuestions 
 classname=java.util.List /
 c:forEach items=${listQuestions} var=question
   c:out value=${question}/
   tiles:insert name=%=question% flush=false / /c:forEach
 
 Gives me : question cannot be resolved
 
 Seems to me it's a basic jsp knowledge... That i don't have.
 Rémi
 
 Le Lundi 11 Juillet 2005 12:13, Leon Rosenberg a écrit :
  use
  flush=false
 
  Flush=true works only in a top page, if you already 
 included another 
  page (or tile) yor aren't allowed to flush. At least in tomcat.
 
  Regards
  Leon
 
   -Ursprüngliche Nachricht-
   Von: Dewitte Rémi [mailto:[EMAIL PROTECTED]
   Gesendet: Montag, 11. Juli 2005 13:59
   An: Struts Users Mailing List
   Betreff: Re: Tiles
  
   Which does not work :
   Can't insert page '/Q/firstName.jsp' : Illegal to flush within a 
   custom tag Hum ... Seems to be a bit complicated !
   Thanks.
  
   Le Lundi 11 Juillet 2005 11:37, Leon Rosenberg a écrit :
logic:iterate name=listQuestions id=question toScope=page
type=java.lang.String
tiles:insert name=%=question% flush=true / 
/logic:iterate
   
Unfortunately you can't get rid of the %=question%, but
  
   it would be
  
the only java code in the page.
   
Regards
leon
   
 -Ursprüngliche Nachricht-
 Von: Dewitte Rémi [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 11. Juli 2005 13:33
 An: Struts Users Mailing List
 Betreff: Re: Tiles

 I answer myself. I achieved doing this :
 tiles:useAttribute id=listQuestions name=listQuestions
 classname=java.util.List /
 %
 java.util.Iterator i=listQuestions.iterator(); while(
  
   i.hasNext() )
  
   {
   String question= (String)i.next(); %
   tiles:insert name=%=question% flush=true /
   br
 %
   }
 %

 Is there any way to do this with tags ? I would like my
  
   presentation
  
 pages don't have java code like this.

 Rémi

 Le Lundi 11 Juillet 2005 13:20, Dewitte Rémi a écrit :
  Hi !
  I make a definition in which i put a list of tiles to
  
   include but
  
  I can't achieve to do this eg :
  in my tiles-defs.xml :
  definition name=page1-def extends=baseDef
  put name=page value=1/
  putList name=listQuestions
  add value=/Q/firstName.jsp/
  add value=/Q/lastName.jsp/
  /putList
  /definition
 
  And in my template, i don't know how to iterate in
  
   listQuestions
  
  in order to include /Q/firstName.jsp and /Q/lastName.jsp.
  A start :
tiles:importAttribute/
c:out value=${listQuestions}/
c:forEach items=${listQuestions} var=question
  What to do to include question !
/c:forEach
 
  Maybe it's not possible...
  Thanks.
  Rémi
  
   
 
  
 -

  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
   
 
  
 - To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
  
   
 
   -
  
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
   
 
   - To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Tiles

2005-07-11 Thread Leon Rosenberg
Use logic tags, they do tie tags to the jsp context. In jstl you'd have to
write something like:
tiles:insert name=${question} flush=false /  

 -Ursprüngliche Nachricht-
 Von: Dewitte Rémi [mailto:[EMAIL PROTECTED] 
 Gesendet: Montag, 11. Juli 2005 15:49
 An: Struts Users Mailing List
 Betreff: Re: Tiles
 
 Going on...
 tiles:useAttribute id=listQuestions name=listQuestions 
 classname=java.util.List /
 c:forEach items=${listQuestions} var=question
   c:out value=${question}/
   tiles:insert name=%=question% flush=false / /c:forEach
 
 Gives me : question cannot be resolved
 
 Seems to me it's a basic jsp knowledge... That i don't have.
 Rémi
 
 Le Lundi 11 Juillet 2005 12:13, Leon Rosenberg a écrit :
  use
  flush=false
 
  Flush=true works only in a top page, if you already 
 included another 
  page (or tile) yor aren't allowed to flush. At least in tomcat.
 
  Regards
  Leon
 
   -Ursprüngliche Nachricht-
   Von: Dewitte Rémi [mailto:[EMAIL PROTECTED]
   Gesendet: Montag, 11. Juli 2005 13:59
   An: Struts Users Mailing List
   Betreff: Re: Tiles
  
   Which does not work :
   Can't insert page '/Q/firstName.jsp' : Illegal to flush within a 
   custom tag Hum ... Seems to be a bit complicated !
   Thanks.
  
   Le Lundi 11 Juillet 2005 11:37, Leon Rosenberg a écrit :
logic:iterate name=listQuestions id=question toScope=page
type=java.lang.String
tiles:insert name=%=question% flush=true / 
/logic:iterate
   
Unfortunately you can't get rid of the %=question%, but
  
   it would be
  
the only java code in the page.
   
Regards
leon
   
 -Ursprüngliche Nachricht-
 Von: Dewitte Rémi [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 11. Juli 2005 13:33
 An: Struts Users Mailing List
 Betreff: Re: Tiles

 I answer myself. I achieved doing this :
 tiles:useAttribute id=listQuestions name=listQuestions
 classname=java.util.List /
 %
 java.util.Iterator i=listQuestions.iterator(); while(
  
   i.hasNext() )
  
   {
   String question= (String)i.next(); %
   tiles:insert name=%=question% flush=true /
   br
 %
   }
 %

 Is there any way to do this with tags ? I would like my
  
   presentation
  
 pages don't have java code like this.

 Rémi

 Le Lundi 11 Juillet 2005 13:20, Dewitte Rémi a écrit :
  Hi !
  I make a definition in which i put a list of tiles to
  
   include but
  
  I can't achieve to do this eg :
  in my tiles-defs.xml :
  definition name=page1-def extends=baseDef
  put name=page value=1/
  putList name=listQuestions
  add value=/Q/firstName.jsp/
  add value=/Q/lastName.jsp/
  /putList
  /definition
 
  And in my template, i don't know how to iterate in
  
   listQuestions
  
  in order to include /Q/firstName.jsp and /Q/lastName.jsp.
  A start :
tiles:importAttribute/
c:out value=${listQuestions}/
c:forEach items=${listQuestions} var=question
  What to do to include question !
/c:forEach
 
  Maybe it's not possible...
  Thanks.
  Rémi
  
   
 
  
 -

  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
   
 
  
 - To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
  
   
 
   -
  
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
   
 
   - To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AW: Tiles is hiding my jsp error messages?!

2005-02-02 Thread Martin Gainty
Ditto  and I would add  start with very specific exceptions (IOException) 
and fall to more general exceptions later on (Exception)
If you want to redirect output to an awaiting Log Server or reformat to HTML 
take a look at Log4j
HTH,

Martin Gainty
(mobile) 617-852-7822

From: Leon Rosenberg [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: 'Struts Users Mailing List' user@struts.apache.org
Subject: AW: Tiles is hiding my jsp error messages?!
Date: Tue, 1 Feb 2005 15:00:54 +0100
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by mc7-f28.hotmail.com 
with Microsoft SMTPSVC(6.0.3790.211); Tue, 1 Feb 2005 06:02:38 -0800
Received: (qmail 30437 invoked by uid 500); 1 Feb 2005 14:02:14 -
Received: (qmail 30397 invoked by uid 99); 1 Feb 2005 14:02:13 -
Received: pass (hermes.apache.org: local policy)
Received: from h-213.61.151.32.host.de.colt.net (HELO anotheria.net) 
(213.61.151.32)  by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Feb 2005 
06:02:11 -0800
Received: from dragonfire ([84.128.66.213]) by anotheria.net for 
[EMAIL PROTECTED] with eXtremail; Tue, 1 Feb 2005 16:56:46 +0100
X-Message-Info: JGTYoYF78jGI5G3rXjm4M/TmGZNnDiYgtmAbYB3woW0=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: mailto:[EMAIL PROTECTED]
List-Subscribe: mailto:[EMAIL PROTECTED]
List-Help: mailto:[EMAIL PROTECTED]
List-Post: mailto:user@struts.apache.org
List-Id: Struts Users Mailing List user.struts.apache.org
Delivered-To: mailing list user@struts.apache.org
X-ASF-Spam-Status: No, hits=0.9 
required=10.0tests=FORGED_RCVD_HELO,PLING_QUERY
X-Spam-Check-By: apache.org
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
thread-index: AcUIdbiHfGjUeZWbS+CJWJnetB7ZogAD3fmA
X-Virus-Checked: Checked
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 01 Feb 2005 14:02:39.0061 (UTC) 
FILETIME=[B07D3850:01C50866]

 Or, if that doesn't help, step 2 (for me) is to remove the
 entire contents of that particular tile, and slowly replace
 it piece by piece until it stops rendering, then examine the
 part you just put back.  I know that sounds crazy, but it
 works for me.and it almost always ends with (head
 smack)...what was I thinking?.
The far more easier debug opportunity is to insert try/catch blocks in each
included page.
And print the exception to stdout/log :-)
:-)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: Tiles is hiding my jsp error messages?!

2005-02-01 Thread Leon Rosenberg
 Or, if that doesn't help, step 2 (for me) is to remove the 
 entire contents of that particular tile, and slowly replace 
 it piece by piece until it stops rendering, then examine the 
 part you just put back.  I know that sounds crazy, but it 
 works for me.and it almost always ends with (head 
 smack)...what was I thinking?.

The far more easier debug opportunity is to insert try/catch blocks in each
included page.
And print the exception to stdout/log :-)
:-)





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Tiles is hiding my jsp error messages?!

2005-02-01 Thread Leon Rosenberg
 Or, if that doesn't help, step 2 (for me) is to remove the 
 entire contents of that particular tile, and slowly replace 
 it piece by piece until it stops rendering, then examine the 
 part you just put back.  I know that sounds crazy, but it 
 works for me.and it almost always ends with (head 
 smack)...what was I thinking?.

The far more easier debug opportunity is to insert try/catch blocks in each
included page.
And print the exception to stdout/log :-)
:-)





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Tiles performance - jsp vs jspf

2004-05-25 Thread Rosenberg, Leon
I don't know anything about jspf's performance (yet :-)) but we are measuring the 
performance of jsps, and they take about 0.x ms for generation (incl. tiles) on a good 
container (resin, tomcat5) , so I don't think you should have a headache there. 

 -Ursprüngliche Nachricht-
 Von: Marcella Turner [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 25. Mai 2004 19:13
 An: [EMAIL PROTECTED]
 Betreff: Tiles performance - jsp vs jspf
 
 I'm very excited to be converting a Stuts application to Struts Tiles.
 However, I have a consideration that I could use some best practices
 opinions on.
 
 The current application has severa .jspf files which are used as includes
 to
 main jsp files.  While doing a proof of concept for converting to Tiles, I
 noticed that if I put the following tiles definition:
 
 definition name=tiles.Template
 path=WEB-INF/layouts/DefaultLayout.jsp
put name=siteTitle value=siteTitle /
put name=navigatorFilename value=/common/nav_bar.jspf /
put name=linkId value=home /
/definition
 
 That the page loaded with an uncompiled nav_bar.  So I changed the
 definition to nav_bar.jsp which worked.
 
 However, I assume that .jspf's were used in this application because they
 offer some perfomance benefit, i.e. the fragment is only cached once or
 something.
 
 Another trick i used to retain the .jsp extention was to put the .jspf
 inside a .jsp file like so:
 
 nav_bar.jsp -
 
 %@ include file=nav_bar.jspf %
 
 --
 
 This technique seems round about - does it offer any preformance benefit?
 
 Thanks
 
 _
 Learn to simplify your finances and your life in Streamline Your Life from
 MSN Money. http://special.msn.com/money/0405streamline.armx
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]