| Author |
Call a static method from JSP
|
Shridhar Raghavan
Ranch Hand
Joined: May 27, 2010
Posts: 71
|
|
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
Joined: Jan 31, 2008
Posts: 7
|
|
|
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
Joined: May 27, 2010
Posts: 71
|
|
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
Joined: Jan 31, 2008
Posts: 7
|
|
|
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
|
 |
 |
|
|
subject: Call a static method from JSP
|
|
|