これは私のJquery Ajax Partです:-
$.ajax({
type: "GET",
data: 'name=' + dept+"&emp=1",
async: false,
url: "master/loginCreateUser.jsp/getEmpName()", //i m not able call thisgetEmpName Function call in this location
success: function(data) {
for(var item in data){
$("#empName").append("<option>" + data[item] + "</option>");
}
}
});
これは私の loginCreateUser.jsp ページです:
<%!
public ArrayList<String> getEmpName() throws Exception {
ArrayList<String> emp = new ArrayList(); %>
<% String s1 = request.getParameter("name"); %>
<%! emp = new UserRights().showEmp(s1); %> //i am not access this s1 variable on this location,it shows the error can't find symbol"
<%
return emp;
}
%>
jsp
ページからこの関数を呼び出すにはどうすればよいですか?