This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaBean vs Post from a JSP

 
Sylvain Bouchard
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,
I need information about populating a bean in a JSP page just before submit the request to a servlet. There's a way to do it? or I must read all the params in the servlet and update the bean, before processing it?
Here is the big picture:
1- useBean to populate my FORM
2- Modify the data
3- set the new bean property to send to the servlet
4- processing
5- forward somewhere else the updated bean
thanks
Bobby Robinson
SCJP
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not possible.
All of the Java in your JSP page executes before the HTML page is sent to the client. Once sent, your JSP is done with its job; no further Java processing is possible.
The only thing you can do once the page has been sent to the client is the usual DHTML/Javascript processing.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic