• 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

Dynamic select without scripts

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I need to write a JSP with two dynamic SELECT's. The first one is easy to populate using JSTL (This select contains a list of class names). The second select(containing method names read using reflection) must be populated when the first select changes. I am trying to move away from using scripts in my JSP's and I am trying to figure out how to do it without scripts.
I have a control servlet used to persist data posted from the JSP, and I think the solution might be to let the first select's onChange send a request to the servlet to make it update itself using maybe a redirect.
Can anyone please tell me what I should be doing, because Im in the dark...

Regards,
Alfred
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if u send ur request to any servlet it takes too much time to execute and also complex too. u can right the same code in ur jsp too only u want to do is submit ur form to same jsp and on the basis of request parameter run the particular part of code r one more thing u can do define a method inside ur jsp and call it when u submit ur request thourgh script
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AJAX is your best bet.
    Bookmark Topic Watch Topic
  • New Topic