Re: T5: Very strange issue getting unreadable code on Tomca

2009-05-19 Thread DH
Forget to mention that T5's gzip is enabled. If gzip is disabled, tomcat6 is ok 
too.

Summary:
If tomat 5.x, everything is ok whether gzip is enabled or not.
If tomcat6.x (we have tested on 6.0.18 too), gzip disabled, OK; Gzip enabled, 
all failed.

DH

- Original Message - 
From: "Borut Bolčina"

>I would try 6.0.18 first.
> 
> 2009/5/19 dh ning 
> 
>>  Hi,
>>
>> One of my friend's T5 application run into a strange issue when running in
>> Tomcat6.0.16 (not test in other tomcat yet, but is ok in Jetty 6.1.17): In
>> browser(IE and Firefox) customers can sometimes (5%) see unreadable code,
>> especially when they access the first time. For developer, if you install
>> web developer plugin in Firefox and  check 'disable cache' option, and
>> rapidly refresh the page(F5), you will see unreadable code up to 50%.
>>
>> Server environment: Windows Server 2003, Simplified Chinese language,
>> Tomcat6.0.16.
>>
>> You can have a test here: http://www.56114.net.cn:8081/xinxi3.1/test. It
>> is
>> really a simple page to print 'A simple page'.
>>
>> We are not sure what causes the issue, maybe Tomcat, T5 or others.
>> Is there someone got this issue before? Or some experienced user (Tomcat
>> and
>> T5) here can give some advices on how to fix it?
>>
>> Thanks,
>> DH
>>
>

Re: [T5.1] Mini tutorial em portugues (CRUD usando Hibernate)

2009-05-19 Thread Thiago H. de Paula Figueiredo
Em Tue, 19 May 2009 22:28:15 -0300, Marcus Veloso   
escreveu:



http://tapestry5.wikidot.com/


Nice work, Marcus!

To add to the list of Portuguese Tapestry texts, I've made an introductory  
presentation about Tapestry (unfortunately a bit outdated now, I hope to  
fix this soon) that includes a cookbook-like Eclipse project at  
http://www.arsmachina.com.br/tapestry. The presentation and the project  
are open-source and all feedback is welcome.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



[T5.1] Mini tutorial em portugues (CRUD usando Hibernate)

2009-05-19 Thread Marcus Veloso
http://tapestry5.wikidot.com/


Re: [T5] TapestryIoC Registry Interop with other Servlets

2009-05-19 Thread Thiago H. de Paula Figueiredo
Em Tue, 19 May 2009 21:03:42 -0300, César Lesc   
escreveu:



Thanks a lot Thiago!


You're welcome


That i  did was to integrate BlazeDS (Flex) with Tapestry5, and it was
pretty easy, if someone is interested, there is a little project in
google code ( http://code.google.com/p/guice-blazeds/ ) that did the
most (if not all) of the work.


Tapestry-IoC had some features inspired by Guice. :) They're more similar  
between them than they are similar with Spring.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5] TapestryIoC Registry Interop with other Servlets

2009-05-19 Thread César Lesc
Thanks a lot Thiago!

That i  did was to integrate BlazeDS (Flex) with Tapestry5, and it was
pretty easy, if someone is interested, there is a little project in
google code ( http://code.google.com/p/guice-blazeds/ ) that did the
most (if not all) of the work.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: printing?

2009-05-19 Thread Thiago H. de Paula Figueiredo
Em Tue, 19 May 2009 20:22:56 -0300, Angelo Chen  
 escreveu:



Hi,


Hi!


This might not be related to tapestry 5, just a quick question: need to
provide a way to print a receipt in my t5 app, any idea how to achieve  
this? thanks.


What about some Javascript (window.print()) and CSS Print?

Some pointers:

http://www.alistapart.com/articles/goingtoprint/
http://www.w3.org/TR/css-print/
http://www.alistapart.com/articles/boom

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



t5: printing?

2009-05-19 Thread Angelo Chen

Hi,

This might not be related to tapestry 5, just a quick question: need to
provide a way to print a receipt in my t5 app, any idea how to achieve this?
thanks.

Angelo

-- 
View this message in context: 
http://www.nabble.com/t5%3A-printing--tp23626244p23626244.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5] TapestryIoC Registry Interop with other Servlets

2009-05-19 Thread Thiago H. de Paula Figueiredo
Em Tue, 19 May 2009 18:21:25 -0300, César Lesc   
escreveu:



Hi,


Hi!



I have a Tap5 Webapp that define some services
How i can access these services from another servlet in the same webapp?
there is any reference to the Registry that i can use?


Get the ServletContext and invoke  
servletContext.getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME). It'll  
return the Registry instance created by Tapestry.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: again on webservices

2009-05-19 Thread Thiago H. de Paula Figueiredo
Em Tue, 19 May 2009 15:57:36 -0300, Andrea Chiumenti   
escreveu:



I have a simple question:
may a T5 page behave like a webservice (soap) ?


Yes. Why not? :)
You can use Tapestry's templating engine to generate the answer or use  
another code or framework to generate the answer and return it as a  
StreamResponse.


--
Thiago H. de Paula Figueiredo
Consultor, desenvolvedor e instrutor em Java
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



[T5] TapestryIoC Registry Interop with other Servlets

2009-05-19 Thread César Lesc
Hi,

I have a Tap5 Webapp that define some services

How i can access these services from another servlet in the same webapp?

there is any reference to the Registry that i can use?

Thanks

César.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [Tapestry 5.1]Loop with checkboxes

2009-05-19 Thread b...@umd

I finally created my own ControlledCheckbox mixin class. It solved this
issue.
Thanks

b...@umd wrote:
> 
> Hi,
> 
> I am new in Tapestry and I am currently developing a webapp which aims at
> launching virtual machine. I created a form in my .tml file with basic
> inputs (TextArea, Checkbox, etc). Now I would like to create some
> Checkboxes with a list of words from my .java file, and then to be able to
> retrieve separatly their states.
> 
> I found  this 
> http://lombok.demon.co.uk/tapestry5Demo/test/components/checkboxgroupdemo
> http://lombok.demon.co.uk/tapestry5Demo/test/components/checkboxgroupdemo 
> which is exactly what I want to do.
> 
> However, in this following part, it uses a mixin ControlledCheckbox and
> then controller :
> 
> #   
> #   
> #  t:mixins="man/ControlledCheckbox"  
> #  controller="colorController"  
> #  value="selected"/>  
> #  ${color}  
> #   
> #   
> #  
> #
> #
> #  value="prop:selectAll"  />   
> # Select all colours  
> #   
> #   
> 
> I have downloaded the .jar which contains the ControlledCheckbox.class
> from this  http://code.google.com/p/tapestry5examples/ url , added it as
> an external jar in the Referenced Libraries of my Eclipse Project but I
> didn't manage to use it. 
> 
> The error returned was "Unable to resolve 'ControlledCheckbox' to a mixin
> class name". So how can I make this class (which is present in my .jar
> file) a mixin class ? (I have already try to put this class in a .mixin
> package but it didn't work)
> 
> Then how does the "controller" parameter work ?
> 
> Thanks.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Tapestry-5.1-Loop-with-checkboxes-tp23524450p23623983.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



again on webservices

2009-05-19 Thread Andrea Chiumenti
I have a simple question:
may a T5 page behave like a webservice (soap) ?

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Changing logging level at runtime

2009-05-19 Thread Paul Field
Just some random ideas you could explore...

It is possible to expose Log4J via JMX.

Hivemind (Tapestry 4) used to do this with a simple piece of configuration 
(http://hivemind.apache.org/hivemind1/hivemind-jmx/manageLog4j.html).

A bit of Googling shows how you can do Log4J level changes with a simple 
JMX bean and JConsole:
http://technology.amis.nl/blog/1238/modify-spring-beans-and-log4j-levels-on-a-running-server-with-jmx-and-jconsole

And where this gets really interesting is if you have multiple servers 
(e.g. tiered architectures and/or clusters), it's really easy to script 
JMX across multiple servers using JRuby and jmx4r:
http://github.com/jmesnil/jmx4r/tree/master

Hope something in that lot is useful for you :-)

Paul

--
Paul Field
Research IT
Deutsche Bank




Peter Stavrinides  
19/05/2009 14:40
Please respond to
"Tapestry users" 


To
Tapestry users 
cc

Subject
Re: Changing logging level at runtime






I have seen this code used with configureAndWatch:
URL url = this.getClass().getResource("log4j.properties");
// Configure the properties and observe the file every 2 seconds
PropertyConfigurator.configureAndWatch(url.getPath(), 2000);

But it is said to be problematic as it may cause issues with shutting down 
classloaders!? so that is why a configuration application is recommended.

Peter

- Original Message -
From: "Borut Bolčina" 
To: "List Tapestry User" 
Sent: Tuesday, 19 May, 2009 14:39:07 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Changing logging level at runtime

Hi,

I've been using log4j's configureAndWatch in some of my backend java apps. 
I
want to be able to change log4j.properties for my T5.0.18 web app and see
the change (log level) in my logs without restarting Tomcat.

My goal is to switch to debug level when I see "fishy behaviur" in the
production deployed apps.

How to achive this in best practice?

-Borut

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org






---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.

Re: T5 Read parameters form context.xml

2009-05-19 Thread ptitcon51

Thanx all for your responses.

Finally, I use  java.utils.Properties class. A regular solution like Borut's
apache solution.
It's for a simple LDAP config, so I don't use DOM for the moment. Maybe
later...

It's a shame that T5 haven't a great solution like 
@config(value="myProp")

Thx all!

ptitcon51

 


Thiago H. de Paula Figueiredo wrote:
> 
> On Tue, May 19, 2009 at 7:38 AM, ptitcon51  wrote:
> 
>> Hi all!
> 
> Hi!
> 
>> T5 reads xml file to configure himself.
> 
> It doesn't read XML files for configuration, just for page and
> component templates. web.xml is read by the servlet container (Jetty,
> Tomcat, etc), not by Tapestry.
> 
>> But I don't know if a sexy solution exists to do it myself.
>> I want to externalize parameters (principally Strings) in my context.xml.
>> Like this :
>>
>> 
>>
>> I could read my xml file with Properties class like this:
>>
>> properties.load("context.xml")
>> properties.getProperty("MyProp")
>>
>> But is there a magic T5 solution? With annotations for example... Like
>> it's
>> possible with properties file.
> 
> If I understand what you're saying, the solution is outside Tapestry,
> being using some XML package instead. I recommend JDOM.
> 
> -- 
> Thiago
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5-Read-parameters-from-context.xml-tp23613669p23619515.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [t5.0.18] Secure Annotation / BaseURLSource

2009-05-19 Thread Dave Greggory

I'm attempting to contribute my own RequestSecurityManager, but if anybody else 
has a better idea where I don't have to touch internal stuff let me know.



- Original Message 
From: Dave Greggory 
To: Tapestry users 
Sent: Tuesday, May 19, 2009 10:51:41 AM
Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource


Well looks like our internal network structure is pretty set and can't be 
changed. 

Users <-- internet (http / https connections ) --> load balancer/firewall <-- 
internal network (http) --> tomcat

We have a way of determining from within a tomcat application whether internet 
connection to firewall is secure. This can be done because the firewall adds a 
request header indicating SSL status. This is how we usually determine this. 
Can I get tapestry use my helper method that does this check to determine 
whether the connection was secure? How can I get secure connections working in 
this situation? 

Thanks so much.
Dave




- Original Message 
From: Dave Greggory 
To: Tapestry users 
Sent: Monday, May 18, 2009 12:16:36 PM
Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource


Don't worry about it, turns out our internal network is screwed up... 
connections between users and the load balancer is secure, but not between load 
balancer and app server.



- Original Message 
From: Dave Greggory 
To: Tapestry users 
Sent: Monday, May 18, 2009 11:56:56 AM
Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource


obviously, it is.



- Original Message 
From: Martin Strand 
To: Tapestry users 
Sent: Monday, May 18, 2009 11:40:40 AM
Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource

Just a guess... perhaps baseSecureURL is not an https url?


On Mon, 18 May 2009 15:15:50 +0200, Dave Greggory  
wrote:

>
> I've been using BaseURLSource(since behind a firewall/load balancer) fine all 
> this time, and recently I needed a secure page, so I added the @Secure 
> annotation on that page. But that page is no longer working because @Secure 
> annotation ends up sending continuous redirects. What am I doing wrong?
>
> My BaseURLSource implementation:
>
> BaseURLSource source = new BaseURLSource()
> {
>   public String getBaseURL(boolean secure)
>   {
>  return (secure) ? baseURL : baseSecureURL;
>   }
> }
>
> Thanks,
> Dave

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


  


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


  


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


  


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


  


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [t5.0.18] Secure Annotation / BaseURLSource

2009-05-19 Thread Dave Greggory

Well looks like our internal network structure is pretty set and can't be 
changed. 

Users <-- internet (http / https connections ) --> load balancer/firewall <-- 
internal network (http) --> tomcat

We have a way of determining from within a tomcat application whether internet 
connection to firewall is secure. This can be done because the firewall adds a 
request header indicating SSL status. This is how we usually determine this. 
Can I get tapestry use my helper method that does this check to determine 
whether the connection was secure? How can I get secure connections working in 
this situation? 

Thanks so much.
Dave




- Original Message 
From: Dave Greggory 
To: Tapestry users 
Sent: Monday, May 18, 2009 12:16:36 PM
Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource


Don't worry about it, turns out our internal network is screwed up... 
connections between users and the load balancer is secure, but not between load 
balancer and app server.



- Original Message 
From: Dave Greggory 
To: Tapestry users 
Sent: Monday, May 18, 2009 11:56:56 AM
Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource


obviously, it is.



- Original Message 
From: Martin Strand 
To: Tapestry users 
Sent: Monday, May 18, 2009 11:40:40 AM
Subject: Re: [t5.0.18] Secure Annotation / BaseURLSource

Just a guess... perhaps baseSecureURL is not an https url?


On Mon, 18 May 2009 15:15:50 +0200, Dave Greggory  
wrote:

>
> I've been using BaseURLSource(since behind a firewall/load balancer) fine all 
> this time, and recently I needed a secure page, so I added the @Secure 
> annotation on that page. But that page is no longer working because @Secure 
> annotation ends up sending continuous redirects. What am I doing wrong?
>
> My BaseURLSource implementation:
>
> BaseURLSource source = new BaseURLSource()
> {
>   public String getBaseURL(boolean secure)
>   {
>  return (secure) ? baseURL : baseSecureURL;
>   }
> }
>
> Thanks,
> Dave

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


  


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


  


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


  


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5: Very strange issue getting unreadable code on Tomca

2009-05-19 Thread Borut Bolčina
I would try 6.0.18 first.

2009/5/19 dh ning 

>  Hi,
>
> One of my friend's T5 application run into a strange issue when running in
> Tomcat6.0.16 (not test in other tomcat yet, but is ok in Jetty 6.1.17): In
> browser(IE and Firefox) customers can sometimes (5%) see unreadable code,
> especially when they access the first time. For developer, if you install
> web developer plugin in Firefox and  check 'disable cache' option, and
> rapidly refresh the page(F5), you will see unreadable code up to 50%.
>
> Server environment: Windows Server 2003, Simplified Chinese language,
> Tomcat6.0.16.
>
> You can have a test here: http://www.56114.net.cn:8081/xinxi3.1/test. It
> is
> really a simple page to print 'A simple page'.
>
> We are not sure what causes the issue, maybe Tomcat, T5 or others.
> Is there someone got this issue before? Or some experienced user (Tomcat
> and
> T5) here can give some advices on how to fix it?
>
> Thanks,
> DH
>


Re: T5 Read parameters form context.xml

2009-05-19 Thread Borut Bolčina
Have a look at

http://www.chenillekit.org/chenillekit-core/configuration.html

which uses

http://commons.apache.org/configuration/

-Borut

2009/5/19 ptitcon51 

>
> Hi all!
>
> T5 reads xml file to configure himself.
> But I don't know if a sexy solution exists to do it myself.
> I want to externalize parameters (principally Strings) in my context.xml.
> Like this :
>
> 
>
> I could read my xml file with Properties class like this:
>
> properties.load("context.xml")
> properties.getProperty("MyProp")
>
> But is there a magic T5 solution? With annotations for example... Like it's
> possible with properties file.
>
> Thanks all
>
> ptitcon51
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/T5-Read-parameters-form-context.xml-tp23613669p23613669.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Changing logging level at runtime

2009-05-19 Thread Peter Stavrinides
I have seen this code used with configureAndWatch:
URL url = this.getClass().getResource("log4j.properties");
// Configure the properties and observe the file every 2 seconds
PropertyConfigurator.configureAndWatch(url.getPath(), 2000);

But it is said to be problematic as it may cause issues with shutting down 
classloaders!? so that is why a configuration application is recommended.

Peter

- Original Message -
From: "Borut Bolčina" 
To: "List Tapestry User" 
Sent: Tuesday, 19 May, 2009 14:39:07 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Changing logging level at runtime

Hi,

I've been using log4j's configureAndWatch in some of my backend java apps. I
want to be able to change log4j.properties for my T5.0.18 web app and see
the change (log level) in my logs without restarting Tomcat.

My goal is to switch to debug level when I see "fishy behaviur" in the
production deployed apps.

How to achive this in best practice?

-Borut

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Changing logging level at runtime

2009-05-19 Thread Thiago H. de Paula Figueiredo
On Tue, May 19, 2009 at 10:18 AM, Borut Bolčina  wrote:
> I am sure Tapestry offers simpler solution (configuring some service) or at
> least offers the infrastructure to implement behind the scenes periodic
> reading of the log4j configuration.
> Does it?

No. Tapestry doesn't even depends on log4j, depending on SL4J instead.

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Message catalog encoding

2009-05-19 Thread Andreas Andreou
There's also an eclipse plugin that help with .properties (and does
the convertions)
- can't quite remember the name though...

On Tue, May 19, 2009 at 3:28 PM, Borut Bolčina  wrote:
> Eclipse does not convert your properties file to utf-8 when you select utf-8
> encoding in properties of the file. Use Notepad++ (for example) for
> converting files between various encodings.
>
> I configured the eclipse to open my utf'8 encoded property files in
> notepad++ instead of build in editor. Also make sure your properties file is
> utf-8 without BOM (Byte Order Mark). See
> https://issues.apache.org/jira/browse/TAP5-409
>
> -Borut
>
> 2009/5/18 Christian Senk 
>
>> Hi,
>>
>> it seems that i have a serious problem with the message catalog encoding.
>> the default eclipse encoding creating new and saving *.properties files
>> seems to be ISO-8859-1. Also if the encoding was UTF-8. eclipse change it
>> to ISO-8859-1.
>>
>> i have two message catalogs "Login.properties" and "Login_de.properties".
>> Some strings in *_de should override values of the default properties file.
>> But this work only in ISO mode, not in UTF-8. The weird thing is that the
>> overriding
>> do not work only for automatic obtained values e.g. for labels.
>>
>> I need some Characters like ü, ä, ö and so on. But this works only for
>> UTF-8 encoded
>> catalogs because the page encoding is UTF-8. But if i encode them in UTF-8
>> it seems
>> the automatic obtained values doesn't work anymore.
>>
>> Any ideas? ^.^
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>



-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Changing logging level at runtime

2009-05-19 Thread Borut Bolčina
I am sure Tapestry offers simpler solution (configuring some service) or at
least offers the infrastructure to implement behind the scenes periodic
reading of the log4j configuration.

Does it?

2009/5/19 Alex Shneyderman 

> On Tue, May 19, 2009 at 2:33 PM, Borut Bolčina 
> wrote:
> > Actually we do have this web app in cluster.
>
> in this case you will have to find out how to propagate level changes
> to all the instances
> of the cluster.
>
> > Are you saying that I should run this simple standalone java app to
> change
> > the log level of the web app?
>
> you could only if you share the class-loader with the app that you
> want to see the
> log levels adjusted - I believe this is default behavior in JBoss.
> Most likely though
> it will be simpler to simply embed the code into an existing application.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


getting httpserver instance

2009-05-19 Thread Andrea Chiumenti
Hello I'm using Tapestry-5.1.0.4 and I need to do something like:

Endpoint endpoint = Endpoint.create(serviceBoundByTapestry);
HttpContext context = httpServer.createContext("/hello");
endpoint.publish(context);

Is it possible to get the httpServer instance ? is there a Service to
inject for this ?

Thanks in advance,
kiuma

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Changing logging level at runtime

2009-05-19 Thread Alex Shneyderman
On Tue, May 19, 2009 at 2:33 PM, Borut Bolčina  wrote:
> Actually we do have this web app in cluster.

in this case you will have to find out how to propagate level changes
to all the instances
of the cluster.

> Are you saying that I should run this simple standalone java app to change
> the log level of the web app?

you could only if you share the class-loader with the app that you
want to see the
log levels adjusted - I believe this is default behavior in JBoss.
Most likely though
it will be simpler to simply embed the code into an existing application.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Changing logging level at runtime

2009-05-19 Thread Borut Bolčina
Actually we do have this web app in cluster.

Are you saying that I should run this simple standalone java app to change
the log level of the web app?

-Borut

2009/5/19 Alex Shneyderman 

> Write a little app to adjust debug levels on the fly. The basics of log4j
> are:
>
> Logger lg = Logger.getLogger( "org.qi4j" );
> lg.setLevel( Level.INFO );
>
> 2 things to watch out for:
>
> 1. Clusters.
> 2. Classes are available in JVM only when loaded. So you will need a
> listing of them before you deploy the app. I do this @ build time.
>
> - Alex
>
> PS: I wish I could publish this app ... but I can not. The basic ideas
> are above.
>
> On Tue, May 19, 2009 at 1:39 PM, Borut Bolčina 
> wrote:
> > Hi,
> >
> > I've been using log4j's configureAndWatch in some of my backend java
> apps. I
> > want to be able to change log4j.properties for my T5.0.18 web app and see
> > the change (log level) in my logs without restarting Tomcat.
> >
> > My goal is to switch to debug level when I see "fishy behaviur" in the
> > production deployed apps.
> >
> > How to achive this in best practice?
> >
> > -Borut
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: Passing named/structured-type params in URLs?

2009-05-19 Thread Andy Buckley
Thiago H. de Paula Figueiredo wrote:
> Em Mon, 18 May 2009 13:31:43 -0300, Andy Buckley
>  escreveu:
> 
>> One final, final (I hope) thing: the decoded context appears to be
>> shared between pages using the same session,
> 
> They aren't. Maybe you're populating persisted fields . . .
> 
>> private Map _params = new TreeMap();
> 
>  . . . or falling in the initialized page fields trap. :) *Never*
> initialize page or component fields in their declaration, as Tapestry
> pools page and instance objects and their initial values are restored
> when an instance is used for another request.

Thanks, that sorted it.

Andy

-- 
Dr Andy Buckley
Institute for Particle Physics Phenomenology
Durham University
0191 3343798 | 0191 3732613 | www.insectnation.org

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Message catalog encoding

2009-05-19 Thread Borut Bolčina
Eclipse does not convert your properties file to utf-8 when you select utf-8
encoding in properties of the file. Use Notepad++ (for example) for
converting files between various encodings.

I configured the eclipse to open my utf'8 encoded property files in
notepad++ instead of build in editor. Also make sure your properties file is
utf-8 without BOM (Byte Order Mark). See
https://issues.apache.org/jira/browse/TAP5-409

-Borut

2009/5/18 Christian Senk 

> Hi,
>
> it seems that i have a serious problem with the message catalog encoding.
> the default eclipse encoding creating new and saving *.properties files
> seems to be ISO-8859-1. Also if the encoding was UTF-8. eclipse change it
> to ISO-8859-1.
>
> i have two message catalogs "Login.properties" and "Login_de.properties".
> Some strings in *_de should override values of the default properties file.
> But this work only in ISO mode, not in UTF-8. The weird thing is that the
> overriding
> do not work only for automatic obtained values e.g. for labels.
>
> I need some Characters like ü, ä, ö and so on. But this works only for
> UTF-8 encoded
> catalogs because the page encoding is UTF-8. But if i encode them in UTF-8
> it seems
> the automatic obtained values doesn't work anymore.
>
> Any ideas? ^.^
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Changing logging level at runtime

2009-05-19 Thread Alex Shneyderman
Write a little app to adjust debug levels on the fly. The basics of log4j are:

Logger lg = Logger.getLogger( "org.qi4j" );
lg.setLevel( Level.INFO );

2 things to watch out for:

1. Clusters.
2. Classes are available in JVM only when loaded. So you will need a
listing of them before you deploy the app. I do this @ build time.

- Alex

PS: I wish I could publish this app ... but I can not. The basic ideas
are above.

On Tue, May 19, 2009 at 1:39 PM, Borut Bolčina  wrote:
> Hi,
>
> I've been using log4j's configureAndWatch in some of my backend java apps. I
> want to be able to change log4j.properties for my T5.0.18 web app and see
> the change (log level) in my logs without restarting Tomcat.
>
> My goal is to switch to debug level when I see "fishy behaviur" in the
> production deployed apps.
>
> How to achive this in best practice?
>
> -Borut
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Message catalog encoding

2009-05-19 Thread Thiago H. de Paula Figueiredo
On Mon, May 18, 2009 at 6:02 PM, Christian Senk  wrote:
> Hi,

Hi!

> it seems that i have a serious problem with the message catalog encoding.
> the default eclipse encoding creating new and saving *.properties files
> seems to be ISO-8859-1. Also if the encoding was UTF-8. eclipse change it
> to ISO-8859-1.

You can configure Eclipse to edit your property files in UTF-8. In
Package Explorer, right-click your file, Properties, Resource tab,
Text file encoding setting.

> i have two message catalogs "Login.properties" and "Login_de.properties".
> Some strings in *_de should override values of the default properties file.
> But this work only in ISO mode, not in UTF-8. The weird thing is that the
> overriding do not work only for automatic obtained values e.g. for labels.

Do you have non-US-ASCII characters in your message keys?

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 Read parameters form context.xml

2009-05-19 Thread Thiago H. de Paula Figueiredo
On Tue, May 19, 2009 at 7:38 AM, ptitcon51  wrote:

> Hi all!

Hi!

> T5 reads xml file to configure himself.

It doesn't read XML files for configuration, just for page and
component templates. web.xml is read by the servlet container (Jetty,
Tomcat, etc), not by Tapestry.

> But I don't know if a sexy solution exists to do it myself.
> I want to externalize parameters (principally Strings) in my context.xml.
> Like this :
>
> 
>
> I could read my xml file with Properties class like this:
>
> properties.load("context.xml")
> properties.getProperty("MyProp")
>
> But is there a magic T5 solution? With annotations for example... Like it's
> possible with properties file.

If I understand what you're saying, the solution is outside Tapestry,
being using some XML package instead. I recommend JDOM.

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Changing logging level at runtime

2009-05-19 Thread Borut Bolčina
Tomcat

2009/5/19 Joachim Van der Auwera 

> use JBoss?
>
>
> Borut Bolčina wrote:
>
>> Hi,
>>
>> I've been using log4j's configureAndWatch in some of my backend java apps.
>> I
>> want to be able to change log4j.properties for my T5.0.18 web app and see
>> the change (log level) in my logs without restarting Tomcat.
>>
>> My goal is to switch to debug level when I see "fishy behaviur" in the
>> production deployed apps.
>>
>> How to achive this in best practice?
>>
>> -Borut
>>
>>
>>
>
>
> --
> Joachim Van der Auwera
> PROGS bvba, progs.be
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Changing logging level at runtime

2009-05-19 Thread Joachim Van der Auwera

use JBoss?

Borut Bolčina wrote:

Hi,

I've been using log4j's configureAndWatch in some of my backend java apps. I
want to be able to change log4j.properties for my T5.0.18 web app and see
the change (log level) in my logs without restarting Tomcat.

My goal is to switch to debug level when I see "fishy behaviur" in the
production deployed apps.

How to achive this in best practice?

-Borut

  



--
Joachim Van der Auwera
PROGS bvba, progs.be


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Changing logging level at runtime

2009-05-19 Thread Borut Bolčina
Hi,

I've been using log4j's configureAndWatch in some of my backend java apps. I
want to be able to change log4j.properties for my T5.0.18 web app and see
the change (log level) in my logs without restarting Tomcat.

My goal is to switch to debug level when I see "fishy behaviur" in the
production deployed apps.

How to achive this in best practice?

-Borut


T5 Components with parameters inside a loop

2009-05-19 Thread rmkkk

Hello,

I have components with parameters. I want to display them inside a loop.
For instance I have a list with two type1  components and two type2
components. When I try to display them inside a loop I have 2 times the
first type1 component and 2 times the type2 component.
I don't see where it comes from...

http://www.nabble.com/file/p23613799/Start.java Start.java 
http://www.nabble.com/file/p23613799/Start.tml Start.tml 
-- 
View this message in context: 
http://www.nabble.com/T5-Components-with-parameters-inside-a-loop-tp23613799p23613799.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



T5 Read parameters form context.xml

2009-05-19 Thread ptitcon51

Hi all!

T5 reads xml file to configure himself. 
But I don't know if a sexy solution exists to do it myself.
I want to externalize parameters (principally Strings) in my context.xml.
Like this :



I could read my xml file with Properties class like this: 

properties.load("context.xml")
properties.getProperty("MyProp")

But is there a magic T5 solution? With annotations for example... Like it's
possible with properties file.

Thanks all

ptitcon51




-- 
View this message in context: 
http://www.nabble.com/T5-Read-parameters-form-context.xml-tp23613669p23613669.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org