Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getParameter value truncated  RSS feed

 
Chris Ong
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!