Re: Session creation

2009-01-28 Thread Tomas Kolda

Thank you,

yes problem is in Form. I do not know how to switch off persistence of 
validation so I will use standard form tag.


Meta did not work, because I can't use it on component variable. It can 
be used only to @Target(TYPE). Maybe you have different version.


Also thanks to Andreas Andreou for Session listener. Great tool to find 
out why session is created.


Tomas


Thiago H. de Paula Figueiredo napsal(a):
Em Tue, 27 Jan 2009 19:40:13 -0300, Tomas Kolda ko...@web2net.cz 
escreveu:


is there a simple way to detect which part or component of my page 
forces Session creation? I do not have @Persist or @ApplicationState 
in page class and it still create session.


I wish I knew, but, by default, the Form component uses the session to 
store validation info.
Try putting @Meta(tapestry.persistence-strategy=client) in your page 
classes or in your components instances. Something like


@Component
@Meta(tapestry.persistence-strategy=client)
private Form form;



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



Re: Session creation

2009-01-28 Thread Thiago H. de Paula Figueiredo
Em Wed, 28 Jan 2009 15:04:35 -0300, Tomas Kolda ko...@web2net.cz  
escreveu:


Meta did not work, because I can't use it on component variable. It can  
be used only to @Target(TYPE). Maybe you have different version.


Put it in the page class at which the Form component is used. I was wrong  
when I suggested to put the annotation in the component. I'm sorry.


--
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: Session creation

2009-01-28 Thread Tomas Kolda
Hmm, I do not know what I'm doing wrong, but it does not work. It still 
create session.


@Meta(tapestry.persistence-strategy=client)
public class Layout {

   @Component
   private Form queryForm;

..


Thiago H. de Paula Figueiredo napsal(a):
Em Wed, 28 Jan 2009 15:04:35 -0300, Tomas Kolda ko...@web2net.cz 
escreveu:


Meta did not work, because I can't use it on component variable. It 
can be used only to @Target(TYPE). Maybe you have different version.


Put it in the page class at which the Form component is used. I was 
wrong when I suggested to put the annotation in the component. I'm sorry.




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



Re: Session creation

2009-01-28 Thread Thiago H. de Paula Figueiredo
Have you put this annotation in all pages with Form components and  
restarted you application (to clear the session)?


--
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: Session creation

2009-01-28 Thread Kalle Korhonen
Layout's still a component (unless you have a page named Layout), need to be
in the page class. I can verify the meta annotation works ok.

Kalle


On Wed, Jan 28, 2009 at 10:48 AM, Tomas Kolda ko...@web2net.cz wrote:

 Hmm, I do not know what I'm doing wrong, but it does not work. It still
 create session.

 @Meta(tapestry.persistence-strategy=client)
 public class Layout {

   @Component
   private Form queryForm;

 ..


 Thiago H. de Paula Figueiredo napsal(a):

 Em Wed, 28 Jan 2009 15:04:35 -0300, Tomas Kolda ko...@web2net.cz
 escreveu:

  Meta did not work, because I can't use it on component variable. It can
 be used only to @Target(TYPE). Maybe you have different version.


 Put it in the page class at which the Form component is used. I was wrong
 when I suggested to put the annotation in the component. I'm sorry.


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




Re: Session creation

2009-01-28 Thread Tomas Kolda
Yes restarted. I deleted all from Index, but form. What am I doing 
wrong? Using 5.0.18, Jetty, Eclipse 3.4.


Index.java:
@Meta(tapestry.persistence-strategy=client)
public class Index
{
   @Property
   private String query;
}

Index.tml:
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
body
t:form t:id=queryForm t:autofocus=false
   t:textField t:id=queryField value=query /
   t:submit t:id=search value=Search/
/t:form
/body
/html

Session listener callstack:
   at 
cz.faiyo.web.services.SessionListener.sessionCreated(SessionListener.java:23)
   at 
org.mortbay.jetty.servlet.AbstractSessionManager.addSession(AbstractSessionManager.java:570)
   at 
org.mortbay.jetty.servlet.AbstractSessionManager.newHttpSession(AbstractSessionManager.java:415)

   at org.mortbay.jetty.Request.getSession(Request.java:1040)
   at 
org.apache.tapestry5.internal.services.RequestImpl.getSession(RequestImpl.java:99)

   at $Request_11f1eb49d54.getSession($Request_11f1eb49d54.java)
   at $Request_11f1eb49d21.getSession($Request_11f1eb49d21.java)
   at 
org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy.postChange(AbstractSessionPersistentFieldStrategy.java:124)
   at 
org.apache.tapestry5.internal.services.PersistentFieldManagerImpl.postChange(PersistentFieldManagerImpl.java:85)
   at 
$PersistentFieldManager_11f1eb49d5a.postChange($PersistentFieldManager_11f1eb49d5a.java)
   at 
org.apache.tapestry5.internal.structure.PageImpl.persistFieldChange(PageImpl.java:192)
   at 
org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.persistFieldChange(InternalComponentResourcesImpl.java:257)
   at 
org.apache.tapestry5.corelib.components.Form._$write_defaultTracker(Form.java)
   at 
org.apache.tapestry5.corelib.components.Form.getDefaultTracker(Form.java:222)

   at $PropertyConduit_11f1eb49d83.get($PropertyConduit_11f1eb49d83.java)
.
.


Thiago H. de Paula Figueiredo napsal(a):
Have you put this annotation in all pages with Form components and 
restarted you application (to clear the session)?




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



Session creation

2009-01-27 Thread Tomas Kolda

Hi,

is there a simple way to detect which part or component of my page 
forces Session creation? I do not have @Persist or @ApplicationState in 
page class and it still create session.


Thanks
Tomas


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



Re: Session creation

2009-01-27 Thread Thiago H. de Paula Figueiredo
Em Tue, 27 Jan 2009 19:40:13 -0300, Tomas Kolda ko...@web2net.cz  
escreveu:


is there a simple way to detect which part or component of my page  
forces Session creation? I do not have @Persist or @ApplicationState in  
page class and it still create session.


I wish I knew, but, by default, the Form component uses the session to  
store validation info.
Try putting @Meta(tapestry.persistence-strategy=client) in your page  
classes or in your components instances. Something like


@Component
@Meta(tapestry.persistence-strategy=client)
private Form form;

--
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: Session creation

2009-01-27 Thread Andreas Andreou
Use httpsessionlistener

http://www.xyzws.com/servletfaq/when-do-i-use-httpsessionlistener/7

In the sessionCreated method, just create an Exception and log it to examine
the traces - or even throw it if you don't want any sessions at all
and want to be
100% sure :)

On Wed, Jan 28, 2009 at 1:49 AM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 Em Tue, 27 Jan 2009 19:40:13 -0300, Tomas Kolda ko...@web2net.cz escreveu:

 is there a simple way to detect which part or component of my page forces
 Session creation? I do not have @Persist or @ApplicationState in page class
 and it still create session.

 I wish I knew, but, by default, the Form component uses the session to store
 validation info.
 Try putting @Meta(tapestry.persistence-strategy=client) in your page
 classes or in your components instances. Something like

 @Component
 @Meta(tapestry.persistence-strategy=client)
 private Form form;

 --
 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





-- 
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: Session Creation...

2008-01-02 Thread Norman Franke
I had similar issues changing from an HTTPs login page to a normal  
HTTP session for speed. I gave up in the end (for now.) I was using  
Tomcat, and it kept randomly creating a new session when switching  
back and forth.


But, I'd bet it's really your servlet container that's doing this,  
not Tapestry.


Norman Franke
ASD, Inc.

On Dec 26, 2007, at 10:41 PM, Steven Woolley wrote:

I am having an issue where a new session is being created by a  
plugin within a page that already has a session.  I need to use  
just one session for both the page and the plugin.  I've tried  
appending the jsessionid to all the requests made by the plugin,  
but a new session is still created (and the session id from the url  
is apparently ignored in favor of the cookie's new session ids).   
Is there a way to work around this, either by forcing the url  
sessionid to be used, or something else?

Thanks,
Steve

-
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]



Session Creation...

2007-12-26 Thread Steven Woolley
I am having an issue where a new session is being created by a plugin  
within a page that already has a session.  I need to use just one  
session for both the page and the plugin.  I've tried appending the  
jsessionid to all the requests made by the plugin, but a new session  
is still created (and the session id from the url is apparently  
ignored in favor of the cookie's new session ids).  Is there a way to  
work around this, either by forcing the url sessionid to be used, or  
something else?

Thanks,
Steve

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