This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JSP and the fly likes Submit button calling Java Methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Submit button calling Java Methods" Watch "Submit button calling Java Methods" New topic

Submit button calling Java Methods

Eric Tan
Ranch Hand

Joined: Oct 11, 2006
Posts: 72
Can anyone please guide me if i have two jsp pages and after i press the submit button in the first page, i want to run two methods in java, that is stored and retrieve method whereby i want to display the results after i have retrieved in the second jsp page?

thanks alot
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62127

No problem. The button triggers a submit to a servlet, which invokes your methods and sets the results on top the request as scoped variables. It then forwards tot he JSP page which retrieves the scoped variables for display.

This is all very typical behavior.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Submit button calling Java Methods