This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes can I realize the purpose with JSP and javaBean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "can I realize the purpose with JSP and javaBean?" Watch "can I realize the purpose with JSP and javaBean?" New topic
Author

can I realize the purpose with JSP and javaBean?

xie yufei
Greenhorn

Joined: Dec 26, 2005
Posts: 19
I want to Realize that when the order page submit, the success order page come up while the javaBean program deal with the user's order.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30050
    
149

Xie,
It sounds like you want to have the JavaBean execute asynchronously while the JSP returns to the user. You could use a Thread object for that.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
xie yufei
Greenhorn

Joined: Dec 26, 2005
Posts: 19
Thanks you, Jeanne.

As the bean will excute for a long time, I just want the submit page can trigger the bean to do it's work while the submit sucess page come up.

In addition, the submit page need pass parameters to the bean.

Look forward to the reply, thanks!
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489


As the bean will excute for a long time, I just want the submit page can trigger the bean to do it's work while the submit sucess page come up.


As Jeanne said, use a thread.

When the request comes in, create a new thread and pass the bean object to the thread. The thread in its run method would have the bean calling the necessary method to process.

The request thread, after this, returns and displays html to the user.

ram.
xie yufei
Greenhorn

Joined: Dec 26, 2005
Posts: 19
Thanks ram for that you explain it in detail.
I'll try again!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can I realize the purpose with JSP and javaBean?
 
Similar Threads
storing an array in a meathod problem...
IBM ICE Question - Use Cases
XML import advice?
calling a .jsp page from a javabean
How to access a servlet context from a JavaBean?