Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic select without scripts

 
Alfred Thomas
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
 
pawank gupta
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
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AJAX is your best bet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic