This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Transferring value from jsp page to Transfer Object

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Can anyone suggest me how to transfer some value from jsp page to any java bean.
my requirement is i want to enter some values in a jsp page and after submitting this page values will be stored in the bean. i have a servlet also. so where i have to handle the values ? i dont want to use "request.getParameter()" also. so is there any way to store the values ??

Thanks a lot in advance.
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either you do it yourself or let frameworks like Struts, Spring MVC do it for you. Eventually request.getParameter() is called to get submitted values from HTML/JSP pages.
So if you don't want to do it yourself, look for web framework like struts and SpringMVC which will make your life easier.
 
Kaushik Baral
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Piyush,

Thanks for your suggestion but unfortunately i am not using any framework. its a jsp/servlet based application. so how i have to do it in this scenario? yes i have to handle it manually. can someone suggest how to do it?

thanks a lot in advance.
 
Marshal
Posts: 67292
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't "transfer a value" from a JSP page. A JSP is simply a template from which an HTML page is created and sent to the browser. Data is then submitted from the HTML page back to the server. On the server this data is read with the getParameter() family of methods.

If you do not understand what JSP is, I suggest this article.
 
Piyush Mangal
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately you have no option but to use request.getParameter() method.
You can have something like below



 
Bras cause cancer. And tiny ads:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!