• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

request.getParameter() LImitation

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Is there any limitation in using request.getParameter()?
I am passing a value in the request object from JSP and when ever its a bit long, it truncates half of that.
Please help !!

Regards,
Alok

 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are indeed limitations when you use GET. The limitation is unspecified and depends on the webbrowser and the application server used. Generally the limitation lies around 255 characters for the query string (the part after the "?"). You need to use POST when you want to send more than only a few input values.
 
Alok Panda
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am aware of the GET method having some limitations. We are using post method and the application is based on struts framework
But sometimes it truncates a part of the string

Regards,
Alok
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Something else in your application is causing the truncation then.
 
Alok Panda
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any idea how should I debug this?

Regards,
Alok
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you should check the struts-config.xml file to check what is the 'scope' defnied in action mapping is it request or something else.

To debug you must first find if you are loosing the data cnsistently while doing request.getParameter or its happenning randomly. If its happening randomly then check the browser setting also.

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How browser setting will effect the getParameter value limit.
As told, GET has a limitation while POST doesn't have.

Somewhere the application code is doing the truncation.
Check your code.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you repeating other's answers? Please tell something new (and correct).
 
reply
    Bookmark Topic Watch Topic
  • New Topic