• 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Calling Bean Code From JSP

 
Bartender
Posts: 1752
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On my JSP page, I have some fields the user enters to try and schedule an appointment. What I would like is to have a button that would check the availability of the person being scheduled.
I know how to do this if I make the FORM ACTION another JSP page, but I want to just call my bean code that would do this lookup and then return the results to the current JSP page.
Can this be done?
My problem is I don't know how to SUBMIT the form without the FORM ACTION being another JSP page or a servlet.
Do I need to use Javascript to do this type of local processing where I can pick what the user has entered in the JSP/HTML form fields and then call the bean method (and return the results to the same JSP page)?
Any advice would be appreciated!!!
Thanks much.
-- Mike
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are indeed stuck with Javascript if you want to modify an HTML page rather than totally regenerating it. Doing this sort of thing is a bit of a pain due to variations in how browsers handle things.
An alternative would be to use an Applet which could talk to a servlet.
Bill
 
Mike London
Bartender
Posts: 1752
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
I went ahead and just set my FORM ACTION to another JSP page.
-- Mike
 
See where your hand is? Not there. It's next to this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic