File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes JavaBean vs Post from a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JavaBean vs Post from a JSP" Watch "JavaBean vs Post from a JSP" New topic

JavaBean vs Post from a JSP

Sylvain Bouchard

Joined: Apr 12, 2004
Posts: 3
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
Bobby Robinson
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

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.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: JavaBean vs Post from a JSP
It's not a secret anymore!