You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Zheng, Xiahong" <Xi...@FMR.COM> on 2008/03/04 22:25:42 UTC

T5: client state problem

Hi

It seems that, on a form submit, T5 automatically redirect to a "GET"
url with client state encoded in the URL. This produces a bookmarkable
URL which is very nice. However, I am running into the following problem
where T5 generates an extremely long "t:state:client" parameter as the
following, 


/viewquotes?t:state:client=H4sIAAAAAAAAAE2QPUsDQRCGJ18GYypFrAQLmzSbICQKV
iEQOL3kYhJsw3o3uazc3W5295I7C8HKUiwV/Af+D3s7axsbOytt3IQgdjPD7DvPs8+fUJjnA
SCjJJxw6RMqqDtBoqlApWVKWKRRRjQgCuWMuahIK2AY6R5KxZQ2VZth4A00l9RHKxTB/immb
187d8X379ss5Gwoj1weCh6ZXcvTsGlf0hmtBjTyqwMtWeQf21AajRcxXRriFK4hY8P6SJjAv
0EihIa1acy14YLSOcP52bIx4FuLQBJrFpCmlDS1DVhy87r78EKfcpCxIK/YFSZi4bm0LZlHF
QNFxqEkihpoJNR1eRzpmQlGSTweUhaR5YnKvdv4eTz6yELehg13YsBxyD2arkgLQpqPWTVlh
W4smU7/qaypNLzgwcrDaNRIvVGraSgeHJJ6

My form only contains one text field that allows user to input a stock
symbol. This long parameter gets carried to all pages and ofter leads to
the following failure

An unexpected application exception has occurred.
Serialized client state was corrupted. This may indicate that too much
state is being stored, which can cause the encoded string to be
truncated by the client web browser.

Any idea why such a long state parameter? Why it gets attached to other
unrelated pages as well?  How to avoid this? I am using 5.0.11-snapshot.

Thanks,
Xiaohong

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


RE: T5: client state problem

Posted by "Zheng, Xiahong" <Xi...@FMR.COM>.
The form will retrieve stock quote for the symbol entered. The Quote
object is then set on the response page. The response page is using
client persistence strategy via the following meta annotation

@Meta("tapestry.persistence-strategy=client")

The quote object is declared as following

public class Quote implements Serializable
{
	private String symbol;
	private String price;
	private String changeToday;
	private String securityName;
	
    /**
     * @return Returns the changeToday.
     */
    public String getChangeToday()
    {
        return changeToday;
    }
    /**
     * @param changeToday The changeToday to set.
     */
    public void setChangeToday(String changeToday)
    {
        this.changeToday = changeToday;
    }
	/**
	 * @return The stock price
	 */
	public String getPrice()
	{
		return price;
	}

	/**
	 * @param price The stock price
	 */
	public void setPrice(String price)
	{
		this.price = price;
	}

	/**
	 * @return The stock symbol
	 */
	public String getSymbol()
	{
		return symbol;
	}

	/**
	 * @param symbol The stock symbol
	 */
	public void setSymbol(String symbol)
	{
		this.symbol = symbol;
	}
	
	/**
	 * @return The security name
	 */
	public String getSecurityName()
	{
		return securityName;
	}

	/**
	 * @param securityName The security name
	 */
	public void setSecurityName(String securityName)
	{
		this.securityName = securityName;
	}
}

Will one instance of such object be serialized into such a long string?
The retrieved quote contains the following exact content,

Symbol="MSFT"
securityName="MICROSOFT CORPORATION"
Price="27.5900"
changeToday="0.600"

 

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com] 
Sent: Tuesday, March 04, 2008 5:08 PM
To: Tapestry users
Subject: Re: T5: client state problem

I believe the wiki has code for a "client:form" persistent strategy
that persists data, but only inside <form> elements.

I would also be concerned at the amount of data here; perhaps an
entire StockSymbol entity (or whatever) is being serialized into the
form, rather than just the stock ticker id.

On Tue, Mar 4, 2008 at 1:25 PM, Zheng, Xiahong <Xi...@fmr.com>
wrote:
> Hi
>
>  It seems that, on a form submit, T5 automatically redirect to a "GET"
>  url with client state encoded in the URL. This produces a
bookmarkable
>  URL which is very nice. However, I am running into the following
problem
>  where T5 generates an extremely long "t:state:client" parameter as
the
>  following,
>
>
>
/viewquotes?t:state:client=H4sIAAAAAAAAAE2QPUsDQRCGJ18GYypFrAQLmzSbICQKV
>
iEQOL3kYhJsw3o3uazc3W5295I7C8HKUiwV/Af+D3s7axsbOytt3IQgdjPD7DvPs8+fUJjnA
>
SCjJJxw6RMqqDtBoqlApWVKWKRRRjQgCuWMuahIK2AY6R5KxZQ2VZth4A00l9RHKxTB/immb
>
187d8X379ss5Gwoj1weCh6ZXcvTsGlf0hmtBjTyqwMtWeQf21AajRcxXRriFK4hY8P6SJjAv
>
0EihIa1acy14YLSOcP52bIx4FuLQBJrFpCmlDS1DVhy87r78EKfcpCxIK/YFSZi4bm0LZlHF
>
QNFxqEkihpoJNR1eRzpmQlGSTweUhaR5YnKvdv4eTz6yELehg13YsBxyD2arkgLQpqPWTVlh
>  W4smU7/qaypNLzgwcrDaNRIvVGraSgeHJJ6
>
>  My form only contains one text field that allows user to input a
stock
>  symbol. This long parameter gets carried to all pages and ofter leads
to
>  the following failure
>
>  An unexpected application exception has occurred.
>  Serialized client state was corrupted. This may indicate that too
much
>  state is being stored, which can cause the encoded string to be
>  truncated by the client web browser.
>
>  Any idea why such a long state parameter? Why it gets attached to
other
>  unrelated pages as well?  How to avoid this? I am using
5.0.11-snapshot.
>
>  Thanks,
>  Xiaohong
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


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


Re: T5: client state problem

Posted by Howard Lewis Ship <hl...@gmail.com>.
I believe the wiki has code for a "client:form" persistent strategy
that persists data, but only inside <form> elements.

I would also be concerned at the amount of data here; perhaps an
entire StockSymbol entity (or whatever) is being serialized into the
form, rather than just the stock ticker id.

On Tue, Mar 4, 2008 at 1:25 PM, Zheng, Xiahong <Xi...@fmr.com> wrote:
> Hi
>
>  It seems that, on a form submit, T5 automatically redirect to a "GET"
>  url with client state encoded in the URL. This produces a bookmarkable
>  URL which is very nice. However, I am running into the following problem
>  where T5 generates an extremely long "t:state:client" parameter as the
>  following,
>
>
>  /viewquotes?t:state:client=H4sIAAAAAAAAAE2QPUsDQRCGJ18GYypFrAQLmzSbICQKV
>  iEQOL3kYhJsw3o3uazc3W5295I7C8HKUiwV/Af+D3s7axsbOytt3IQgdjPD7DvPs8+fUJjnA
>  SCjJJxw6RMqqDtBoqlApWVKWKRRRjQgCuWMuahIK2AY6R5KxZQ2VZth4A00l9RHKxTB/immb
>  187d8X379ss5Gwoj1weCh6ZXcvTsGlf0hmtBjTyqwMtWeQf21AajRcxXRriFK4hY8P6SJjAv
>  0EihIa1acy14YLSOcP52bIx4FuLQBJrFpCmlDS1DVhy87r78EKfcpCxIK/YFSZi4bm0LZlHF
>  QNFxqEkihpoJNR1eRzpmQlGSTweUhaR5YnKvdv4eTz6yELehg13YsBxyD2arkgLQpqPWTVlh
>  W4smU7/qaypNLzgwcrDaNRIvVGraSgeHJJ6
>
>  My form only contains one text field that allows user to input a stock
>  symbol. This long parameter gets carried to all pages and ofter leads to
>  the following failure
>
>  An unexpected application exception has occurred.
>  Serialized client state was corrupted. This may indicate that too much
>  state is being stored, which can cause the encoded string to be
>  truncated by the client web browser.
>
>  Any idea why such a long state parameter? Why it gets attached to other
>  unrelated pages as well?  How to avoid this? I am using 5.0.11-snapshot.
>
>  Thanks,
>  Xiaohong
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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