• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Call a static method from JSP

 
Shridhar Raghavan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to populate a two level drop down list by calling a static method from my JSP. Presently i can't figure out how to get hold of the first. Here's the JSP code



The DBConnector static method:


Do i need to mention the useBean tag and do i need to import any classes in my jsp. Hope for a quick response. Thanks.
 
Shrivastava Amit
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to import all classes which you are using in your jsp and if these classes don't belong to java.lang package.
 
Shridhar Raghavan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya thanks. That worked. Now wanted to populate the second drop down. Looked around and i learnt that i need AJAX for that. Can someone help me with that? As in what would go in the javascript function and what classes need to be setup on the server and does the gui need to join. Or point to an appropriate resource.



That is the present code. The list gets populated. Now i need to populate another drop down baseed on selected project. What do i need in the "getIterations" funcation
 
Shrivastava Amit
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are allowed to use javascript library then pick one of the available libraries (jquery, protoype etc). I personally prefer jquery as it has great api. You can find many example for using jquery ajax with java. Have a look at Jquery with Java web app
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic