Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

getParameter value truncated

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 1HTML page will post the value to another HTML, but when i received the value on the new HTML, the value is truncated.

But if passing to JAVA the issue is not occurs.
 
Marshal
Posts: 67420
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Always post forms to servlets, not JSP pages.
 
Chris Ong
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. I amnot posting the form to another HTML.
2. I am passing a parameter to another HTML to provide filtering.
3. JSP can have JAVA and HTML together, but it not recommend to process the passing parameter.
4. Now I just want to show the value from the previous HTML to the new HTML
 
Bear Bibeault
Marshal
Posts: 67420
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTML has no means to process parameters. Use a servlets to grab the parameter value then forward to a JSP for display.
 
Chris Ong
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why need to pass to servlet and post back to JSP?

Why cannot directly from 1 JSP to another JSP?
 
Bear Bibeault
Marshal
Posts: 67420
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all you need to do is display the value, then you could do that busing the param EL implicit variable. For example: ${param.someName}

But if there is to be any kind of form processing, that should be done in a servlet. And never, ever, should Java code be placed in a modern JSP.

Please see this article for information on properly structuring Java web applications.
 
Arthur, where are your pants? Check under this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic