You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Arjun Dhar <dh...@yahoo.com> on 2011/09/25 13:13:03 UTC

wicketAjaxGet Size limt

Hi,
>From a JavaScript code (CkEditor pluin to be exact), I want to send data to
my wicket component/panel.
I traced the generated code, and it uses "wicketAjaxGet". With wicketAjaxGet
I can get in 3000+ characters on a rough. 

This seems to have size limitation, whats the best way to get around that?

Additional Context
--------------------
Would like this to be as scalable as possible so I can send Contents in my
CkEditor on my Custom Ajax-Save button. Basically have created a plugin in
CkEditor and have my Ajax-Save on the Editor Toolbar (no Wicket button). I
have a Proxy link that generates the script, and then on JavaScript I simply
rip that off and do an eval (<server generated function code +
modifications). This submits back the data to the server and it all works
well. Just the size limit bothers me a bit. Have avoided using forms sicxe I
dont see a conceptual need for forms.

wicketAjaxPost or wicketSerializeForm  (?)
----------------------------------------------
....Discussion sake .... (maybe not relevant)
I saw some post few months back where guy talks about wicketAjaxPost and
serializing Forms using wicketSerializeForm. But no code or context provided
so not sure how that works. plus wicketSerializeForm takes only one param
... the form element in javbscript. So how does it send data back to server?

Preferred Area of Solution
-------------------------
Note: This script can be modified @ the server in public final CharSequence
getCallbackUrl(final boolean onlyTargetActivePage) ; Looking for some server
side wizardry so I dont have to put in Hacke (replace commands in
javascript).



-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3841117.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by jcgarciam <jc...@gmail.com>.
When using GET content is limited per browser. ie: Modern Browser set a
limit to 8K while others just 2K.

When using POST per the spec browser are mandate to set content-length
header, i have no idea what is going on your end, but definitely will
suggest to try that out on a different container such as Tomcat just to see
if this is something Jetty related.

On Sun, Sep 25, 2011 at 4:58 PM, Arjun Dhar [via Apache Wicket] <
ml-node+s1842946n3842018h99@n4.nabble.com> wrote:

> Since it was a server error, I changed the "headerBufferSize" config in
> Jetty and it worked
> ..but then on changing Jetty Config wicketAjaxPost & wicketAjaxGet were
> both working.
>
> "headerBufferSize" uses the request header imo, so on post why do we need
> the request header?
> ..Something does not seem right with my understanding of these functions or
> perhaps how JETTY handles requests.
>
> Its left me a little confused :(
>
>
> Jetty config fix
> --------------
>
> <!-- http://docs.codehaus.org/display/JETTY/Configuring+Connectors --><raw>
>
>                                                         <connector
> implementation="org.mortbay.jetty.nio.SelectChannelConnector">
>
> <port>9090</port>
>
> <maxIdleTime>60000</maxIdleTime>
>
> <headerBufferSize>24000</headerBufferSize>
>                                                         </connector>
> **
>
>
> ..what im still worried about is the HeaderBuffer Size
> Software documentation is like sex: when it is good, it is very, very good;
> and when it is bad, it is still better than nothing!
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842018.html
>  To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842025.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by Arjun Dhar <dh...@yahoo.com>.
Hi, its working now. For the sake of dcoumentation anyone looking to override
how their Component does a callback on a custom behaviorthat extends
AbstractDefaultAjaxBehavior :



..Will adapt to GET & POST accordingly.

tx

-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842094.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by Arjun Dhar <dh...@yahoo.com>.
Attila Király & jcgarciam --- Yup, thats it I guess. You guys are right (i
think)

I was just blindly hacking the urls & using the wicket functions. 
I see now : function wicketAjaxPost(url, body, successHandler,
failureHandler, precondition, channel)

..and what I'm consuming is only the URL param.

Example:


I should be using the second param for POST to really take advantage.
Thank you all. Yup, it all makes sense now.

-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842041.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by jcgarciam <jc...@gmail.com>.
I'm seeing you request is still being sent as GET, since your parameters are
bound to the URL. If it would have been POST the content of your request
would appear below the:


Content-Length:wwww


Yor content here....


Or am i missing something.


On Sun, Sep 25, 2011 at 5:05 PM, Attila Király [via Apache Wicket] <
ml-node+s1842946n3842028h9@n4.nabble.com> wrote:

> Aren't you sending your data in the url? Even if you are using POST you can
>
> still have some (all) data in the url as query parameters. And there are
> limits for url length (both on client/browser side and server side). This
> would also explain why does it depend on header buffer size as the url is
> read into that buffer.
>
> Attila
>
> 2011/9/25 Arjun Dhar <[hidden email]<http://user/SendEmail.jtp?type=node&node=3842028&i=0>>
>
>
> > Since it was a server error, I changed the "headerBufferSize" config in
> > Jetty
> > and it worked
> > ..but then on changing Jetty Config wicketAjaxPost & wicketAjaxGet were
> > both
> > working.
> >
> > "headerBufferSize" uses the request header imo, so on post why do we need
>
> > the request header?
> > ..Something does not seem right with my understanding of these functions
> or
> > perhaps how JETTY handles requests.
> >
> > Its left me a little confused :(
> >
> >
> > Jetty config fix
> > --------------
> >
> >                                                        <connector
> > implementation="org.mortbay.jetty.nio.SelectChannelConnector">
> >
> >  <port>9090</port>
> >
> >  <maxIdleTime>60000</maxIdleTime>
> >
> >  <headerBufferSize>24000</headerBufferSize>
> >                                                        </connector>
> >
> >
> >
> > ..what im still worried about is the HeaderBuffer Size
> >
> > -----
> > Software documentation is like sex: when it is good, it is very, very
> good;
> > and when it is bad, it is still better than nothing!
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842018.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3842028&i=1>
> > For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3842028&i=2>
> >
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842028.html
>  To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842032.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by Attila Király <ki...@gmail.com>.
Aren't you sending your data in the url? Even if you are using POST you can
still have some (all) data in the url as query parameters. And there are
limits for url length (both on client/browser side and server side). This
would also explain why does it depend on header buffer size as the url is
read into that buffer.

Attila

2011/9/25 Arjun Dhar <dh...@yahoo.com>

> Since it was a server error, I changed the "headerBufferSize" config in
> Jetty
> and it worked
> ..but then on changing Jetty Config wicketAjaxPost & wicketAjaxGet were
> both
> working.
>
> "headerBufferSize" uses the request header imo, so on post why do we need
> the request header?
> ..Something does not seem right with my understanding of these functions or
> perhaps how JETTY handles requests.
>
> Its left me a little confused :(
>
>
> Jetty config fix
> --------------
>
>                                                        <connector
> implementation="org.mortbay.jetty.nio.SelectChannelConnector">
>
>  <port>9090</port>
>
>  <maxIdleTime>60000</maxIdleTime>
>
>  <headerBufferSize>24000</headerBufferSize>
>                                                        </connector>
>
>
>
> ..what im still worried about is the HeaderBuffer Size
>
> -----
> Software documentation is like sex: when it is good, it is very, very good;
> and when it is bad, it is still better than nothing!
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842018.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: wicketAjaxGet Size limt

Posted by Arjun Dhar <dh...@yahoo.com>.
Since it was a server error, I changed the "headerBufferSize" config in Jetty
and it worked
..but then on changing Jetty Config wicketAjaxPost & wicketAjaxGet were both
working.

"headerBufferSize" uses the request header imo, so on post why do we need
the request header?
..Something does not seem right with my understanding of these functions or
perhaps how JETTY handles requests.

Its left me a little confused :(


Jetty config fix
--------------

							<connector
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
								<port>9090</port>
								<maxIdleTime>60000</maxIdleTime>
								<headerBufferSize>24000</headerBufferSize>
							</connector>



..what im still worried about is the HeaderBuffer Size

-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842018.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by Arjun Dhar <dh...@yahoo.com>.
"When using Post, are you seeing a "content-length" header?"
Yes, but its '0':


-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842027.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by jcgarciam <jc...@gmail.com>.
When using Post, are you seeing a "content-length" header?


On Sun, Sep 25, 2011 at 4:29 PM, Arjun Dhar [via Apache Wicket] <
ml-node+s1842946n3841975h66@n4.nabble.com> wrote:

> Found root cause; confirm.
> Am getting a HTTP 413 return (Server puking it on Post)
> ...any suggestions?
> Software documentation is like sex: when it is good, it is very, very good;
> and when it is bad, it is still better than nothing!
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3841975.html
>  To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3842015.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by Arjun Dhar <dh...@yahoo.com>.
Found root cause; confirm.
Am getting a HTTP 413 return (Server puking it on Post)
...any suggestions?

-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3841975.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by Arjun Dhar <dh...@yahoo.com>.
Actually i did try that also and in the HTTP Live header plugin I can see its
getting POST'ed. yet for some reason content larger than a certain size is
not going.

I hope this is not a problem with CKEditor or Jetty (standard config)

thanks for the tip. I'll check other things to see why large size is not
working out.
If you have any suggestions, I'll followup.

-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3841930.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by jcgarciam <jc...@gmail.com>.
https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html


On Sun, Sep 25, 2011 at 11:23 AM, Juan Carlos Garcia <jc...@gmail.com>wrote:

> Use Post *instead of using Get, **limitation is set by Browsers.*
>
> see: *wicketAjaxPost function*
>
> On Sun, Sep 25, 2011 at 8:13 AM, Arjun Dhar [via Apache Wicket] <
> ml-node+s1842946n3841117h68@n4.nabble.com> wrote:
>
>> Hi,
>> From a JavaScript code (CkEditor pluin to be exact), I want to send data
>> to my wicket component/panel.
>> I traced the generated code, and it uses "wicketAjaxGet". With
>> wicketAjaxGet I can get in 3000+ characters on a rough.
>>
>> This seems to have size limitation, whats the best way to get around that?
>>
>>
>> Additional Context
>> --------------------
>> Would like this to be as scalable as possible so I can send Contents in my
>> CkEditor on my Custom Ajax-Save button. Basically have created a plugin in
>> CkEditor and have my Ajax-Save on the Editor Toolbar (no Wicket button). I
>> have a Proxy link that generates the script, and then on JavaScript I simply
>> rip that off and do an eval (<server generated function code +
>> modifications). This submits back the data to the server and it all works
>> well. Just the size limit bothers me a bit. Have avoided using forms sicxe I
>> dont see a conceptual need for forms.
>>
>> wicketAjaxPost or wicketSerializeForm  (?)
>> ----------------------------------------------
>> ....Discussion sake .... (maybe not relevant)
>> I saw some post few months back where guy talks about wicketAjaxPost and
>> serializing Forms using wicketSerializeForm. But no code or context provided
>> so not sure how that works. plus wicketSerializeForm takes only one param
>> ... the form element in javbscript. So how does it send data back to server?
>>
>>
>> Preferred Area of Solution
>> -------------------------
>> Note: This script can be modified @ the server in public final
>> CharSequence getCallbackUrl(final boolean onlyTargetActivePage) ; Looking
>> for some server side wizardry so I dont have to put in Hacke (replace
>> commands in javascript).
>>
>> Software documentation is like sex: when it is good, it is very, very
>> good; and when it is bad, it is still better than nothing!
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3841117.html
>>  To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>>
>>
>
>
>
> --
>
> JC
>
>
>


-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3841408.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: wicketAjaxGet Size limt

Posted by jcgarciam <jc...@gmail.com>.
Use Post *instead of using Get, **limitation is set by Browsers.*

see: *wicketAjaxPost function*

On Sun, Sep 25, 2011 at 8:13 AM, Arjun Dhar [via Apache Wicket] <
ml-node+s1842946n3841117h68@n4.nabble.com> wrote:

> Hi,
> From a JavaScript code (CkEditor pluin to be exact), I want to send data to
> my wicket component/panel.
> I traced the generated code, and it uses "wicketAjaxGet". With
> wicketAjaxGet I can get in 3000+ characters on a rough.
>
> This seems to have size limitation, whats the best way to get around that?
>
> Additional Context
> --------------------
> Would like this to be as scalable as possible so I can send Contents in my
> CkEditor on my Custom Ajax-Save button. Basically have created a plugin in
> CkEditor and have my Ajax-Save on the Editor Toolbar (no Wicket button). I
> have a Proxy link that generates the script, and then on JavaScript I simply
> rip that off and do an eval (<server generated function code +
> modifications). This submits back the data to the server and it all works
> well. Just the size limit bothers me a bit. Have avoided using forms sicxe I
> dont see a conceptual need for forms.
>
> wicketAjaxPost or wicketSerializeForm  (?)
> ----------------------------------------------
> ....Discussion sake .... (maybe not relevant)
> I saw some post few months back where guy talks about wicketAjaxPost and
> serializing Forms using wicketSerializeForm. But no code or context provided
> so not sure how that works. plus wicketSerializeForm takes only one param
> ... the form element in javbscript. So how does it send data back to server?
>
>
> Preferred Area of Solution
> -------------------------
> Note: This script can be modified @ the server in public final CharSequence
> getCallbackUrl(final boolean onlyTargetActivePage) ; Looking for some server
> side wizardry so I dont have to put in Hacke (replace commands in
> javascript).
>
> Software documentation is like sex: when it is good, it is very, very good;
> and when it is bad, it is still better than nothing!
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3841117.html
>  To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicketAjaxGet-Size-limt-tp3841117p3841406.html
Sent from the Users forum mailing list archive at Nabble.com.

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