I'm learning about web development. And I'm using jquery $.get method to fetch data from a server through http GET. here is a snippet of my code
js:
$.get("servlet.jsp", function(data){
alert("first name is: "+ data);
jsp:
<%
Dao users = new Dao();
out.println(users.fetchLastName("Jack"));
%>
where Dao is a java class that fetch last name of first name Jack from a database.
That produced an internal server error. So does this mean that the method fetchLastName has somehow failed to establish connection to the database even though that it works when I run it normally, or is it that I haven't done the correct mapping of the output?